feat: 热搜关键词
This commit is contained in:
20
lib/http/search.dart
Normal file
20
lib/http/search.dart
Normal file
@ -0,0 +1,20 @@
|
||||
import 'package:pilipala/http/index.dart';
|
||||
import 'package:pilipala/models/search/hot.dart';
|
||||
|
||||
class SearchHttp {
|
||||
static Future hotSearchList() async {
|
||||
var res = await Request().get(Api.hotSearchList);
|
||||
if (res.data['code'] == 0) {
|
||||
return {
|
||||
'status': true,
|
||||
'data': HotSearchModel.fromJson(res.data),
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
'status': false,
|
||||
'date': [],
|
||||
'msg': '请求错误 🙅',
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user