fix: typo
This commit is contained in:
@ -185,7 +185,7 @@ class Api {
|
||||
static const String searchDefault = '/x/web-interface/wbi/search/default';
|
||||
|
||||
// 搜索关键词
|
||||
static const String serachSuggest =
|
||||
static const String searchSuggest =
|
||||
'https://s.search.bilibili.com/main/suggest';
|
||||
|
||||
// 分类搜索
|
||||
|
@ -70,14 +70,14 @@ class ApiInterceptor extends Interceptor {
|
||||
case DioExceptionType.sendTimeout:
|
||||
return '发送请求超时,请检查网络设置';
|
||||
case DioExceptionType.unknown:
|
||||
final String res = await checkConect();
|
||||
final String res = await checkConnect();
|
||||
return '$res \n 网络异常,请稍后重试!';
|
||||
// default:
|
||||
// return 'Dio异常';
|
||||
}
|
||||
}
|
||||
|
||||
static Future<String> checkConect() async {
|
||||
static Future<String> checkConnect() async {
|
||||
final ConnectivityResult connectivityResult =
|
||||
await Connectivity().checkConnectivity();
|
||||
if (connectivityResult == ConnectivityResult.mobile) {
|
||||
|
@ -36,7 +36,7 @@ class SearchHttp {
|
||||
|
||||
// 获取搜索建议
|
||||
static Future searchSuggest({required term}) async {
|
||||
var res = await Request().get(Api.serachSuggest,
|
||||
var res = await Request().get(Api.searchSuggest,
|
||||
data: {'term': term, 'main_ver': 'v1', 'highlight': term});
|
||||
if (res.data is String) {
|
||||
Map<String, dynamic> resultMap = json.decode(res.data);
|
||||
|
Reference in New Issue
Block a user