diff --git a/lib/http/http_utils.dart b/lib/http/http_utils.dart index cc3c424..8475aaf 100755 --- a/lib/http/http_utils.dart +++ b/lib/http/http_utils.dart @@ -48,6 +48,10 @@ class HttpUtils { name: 'Response Text: ', ); } + Map map = response.data; + if (map.keys.contains('code') && map['code'] == 401) { + response.data = {'resultCode': 'UNLOGIN', 'resultMsg': '请重新登录'}; + } /// 对接口抛出异常的检查 _apiVerify(response);