feat: UP主投稿搜索

This commit is contained in:
guozhigq
2023-09-24 00:34:20 +08:00
parent f79e4765c2
commit 7ad6b25abe
7 changed files with 324 additions and 2 deletions

View File

@ -245,6 +245,9 @@ class Api {
// wts=1689767832
static const String memberArchive = '/x/space/wbi/arc/search';
// 用户动态搜索
static const String memberDynamicSearch = '/x/space/dynamic/search';
// 用户动态
static const String memberDynamic = '/x/polymer/web-dynamic/v1/feed/space';

View File

@ -66,7 +66,7 @@ class MemberHttp {
int ps = 30,
int tid = 0,
int? pn,
String keyword = '',
String? keyword,
String order = 'pubdate',
bool orderAvoided = true,
}) async {
@ -75,7 +75,7 @@ class MemberHttp {
'ps': ps,
'tid': tid,
'pn': pn,
'keyword': keyword,
'keyword': keyword ?? '',
'order': order,
'platform': 'web',
'web_location': 1550101,
@ -121,4 +121,27 @@ class MemberHttp {
};
}
}
// 搜索用户动态
static Future memberDynamicSearch({int? pn, int? ps, int? mid}) async {
var res = await Request().get(Api.memberDynamic, data: {
'keyword': '海拔',
'mid': mid,
'pn': pn,
'ps': ps,
'platform': 'web'
});
if (res.data['code'] == 0) {
return {
'status': true,
'data': DynamicsDataModel.fromJson(res.data['data']),
};
} else {
return {
'status': false,
'data': [],
'msg': res.data['message'],
};
}
}
}