ZaiZai 1 年之前
父节点
当前提交
58dd4443d2
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/api/request/index.js

+ 3 - 0
src/api/request/index.js

@@ -17,6 +17,9 @@ export const HcApi = async (obj, msg = true) => {
         obj.headers['Sys-Id'] = obj.headers['Sys-Id'] ?? website.sysId
         obj.headers['Sys-Id'] = obj.headers['Sys-Id'] ?? website.sysId
         //发起请求
         //发起请求
         httpApi(obj).then((response) => {
         httpApi(obj).then((response) => {
+            if (response.code !== 200) {
+                getResData(response, msg)
+            }
             resolve(response)
             resolve(response)
         }).catch((response) => {
         }).catch((response) => {
             getResData(response, msg)
             getResData(response, msg)