ZaiZai há 1 ano atrás
pai
commit
58dd4443d2
1 ficheiros alterados com 3 adições e 0 exclusões
  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
         //发起请求
         httpApi(obj).then((response) => {
+            if (response.code !== 200) {
+                getResData(response, msg)
+            }
             resolve(response)
         }).catch((response) => {
             getResData(response, msg)