Browse Source

随手办公接口403返回登录页

jwyu 1 year ago
parent
commit
038875d59f
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/api/ssbg/http.js

+ 6 - 1
src/api/ssbg/http.js

@@ -35,7 +35,12 @@ _axios.interceptors.request.use(
 _axios.interceptors.response.use(
   function (response) {
     // Do something with response data
-    
+    if(response.data.code===403){
+      wx.miniProgram.reLaunch({
+        url:"/pages/login/login"
+      })
+      return
+    }
     return response.data;
   },
   function (error) {