From aa47bc97d5dddf804d44af91e42a25dbd16e8a1b Mon Sep 17 00:00:00 2001 From: wangliankun Date: Thu, 7 May 2026 18:05:51 +0800 Subject: [PATCH] =?UTF-8?q?feat(http):=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http/http_utils.dart | 4 ++++ 1 file changed, 4 insertions(+) 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);