feat(http):修改请求结果
This commit is contained in:
1 parent
0b45f6a6c1
commit
aa47bc97d5
1 file changed
+4
@@ -48,6 +48,10 @@ class HttpUtils {
|
||||
name: 'Response Text: ',
|
||||
);
|
||||
}
|
||||
Map<String, dynamic> map = response.data;
|
||||
if (map.keys.contains('code') && map['code'] == 401) {
|
||||
response.data = {'resultCode': 'UNLOGIN', 'resultMsg': '请重新登录'};
|
||||
}
|
||||
|
||||
/// 对接口抛出异常的检查
|
||||
_apiVerify(response);
|
||||
|
||||
Reference in new issue
Block a user