opt: search

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-01-13 18:51:53 +08:00
parent 5df86cc533
commit 4b7581d9fe
2 changed files with 5 additions and 2 deletions

View File

@@ -97,7 +97,10 @@ class SearchHttp {
if (pubEnd != null) 'pubtime_end_s': pubEnd,
};
var res = await Request().get(Api.searchByType, queryParameters: reqData);
if (res.data['code'] is int && res.data['code'] == 0) {
if (res.data is! Map) {
return LoadingState.error('没有相关数据');
}
if (res.data['code'] == 0) {
dynamic data;
try {
switch (searchType) {

View File

@@ -245,7 +245,7 @@ class VideoHttp {
'web_location': 1550101,
});
final usePgcApi = forcePgcApi == true || GStorage.isLogin;
late final usePgcApi = forcePgcApi == true || GStorage.isLogin;
try {
var res = await Request().get(