From 733ff47f267c42ee4147425a97c9743f68cf4153 Mon Sep 17 00:00:00 2001 From: "453530270@qq.com" Date: Tue, 2 Jan 2024 20:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86code=E4=B8=BA200=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/request/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/request/index.js b/utils/request/index.js index 2aff466..8db227c 100644 --- a/utils/request/index.js +++ b/utils/request/index.js @@ -108,6 +108,7 @@ $http.dataFactory = async res => { errMsg: 'http状态码错误' }) } + // console.log("rsp",res.response) let httpData = res.response.data @@ -135,6 +136,11 @@ $http.dataFactory = async res => { return Promise.resolve(httpData) } + if (httpData.code == 200) { + // 返回正确的结果(then接受数据) + return Promise.resolve(httpData) + } + // why 系统专有 if(httpData.resultCode == '00000000'){ return Promise.resolve(httpData)