feat: 搜索分区UI

This commit is contained in:
guozhigq
2024-05-13 23:37:22 +08:00
parent 38bddb236a
commit e141834bb4
5 changed files with 142 additions and 8 deletions

View File

@ -189,7 +189,7 @@ class Api {
'https://s.search.bilibili.com/main/suggest';
// 分类搜索
static const String searchByType = '/x/web-interface/search/type';
static const String searchByType = '/x/web-interface/wbi/search/type';
// 记录视频播放进度
// https://github.com/SocialSisterYi/bilibili-API-collect/blob/master/docs/video/report.md

View File

@ -75,6 +75,7 @@ class SearchHttp {
required page,
String? order,
int? duration,
int? tid,
}) async {
var reqData = {
'search_type': searchType.type,
@ -84,6 +85,7 @@ class SearchHttp {
'page': page,
if (order != null) 'order': order,
if (duration != null) 'duration': duration,
if (tid != null) 'tid': tid,
};
var res = await Request().get(Api.searchByType, data: reqData);
if (res.data['code'] == 0 && res.data['data']['numPages'] > 0) {