From 79eb8a891be0452f289cdcfef49b138215f56eaa Mon Sep 17 00:00:00 2001 From: wangliankun Date: Tue, 28 Apr 2026 10:45:44 +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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/http/http_utils.dart b/lib/http/http_utils.dart index 4477212..7a3f9cd 100755 --- a/lib/http/http_utils.dart +++ b/lib/http/http_utils.dart @@ -103,6 +103,12 @@ class HttpUtils { // value: response.headers["authorization"]![0]); // } if (isShowLoading) EasyLoading.dismiss(); + + ///转化结果 + Map map = response.data; + if (map.keys.contains('code') && map['code'] == 401) { + response.data = {'resultCode': 'FAIL', 'resultMsg': '请重新登录'}; + } netResult = NetResult( headers: response.headers, result: response.data,