feat(http):修改请求结果

This commit is contained in:
2026-04-28 10:45:44 +08:00
parent 01178bc033
commit 79eb8a891b

View File

@@ -103,6 +103,12 @@ class HttpUtils {
// value: response.headers["authorization"]![0]); // value: response.headers["authorization"]![0]);
// } // }
if (isShowLoading) EasyLoading.dismiss(); if (isShowLoading) EasyLoading.dismiss();
///转化结果
Map<String, dynamic> map = response.data;
if (map.keys.contains('code') && map['code'] == 401) {
response.data = {'resultCode': 'FAIL', 'resultMsg': '请重新登录'};
}
netResult = NetResult( netResult = NetResult(
headers: response.headers, headers: response.headers,
result: response.data, result: response.data,