Browse Source

解决无法跳入401

YaolongHan 4 năm trước cách đây
mục cha
commit
6e9171daa4
2 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 2 2
      src/api/httputils.js
  2. 0 3
      src/main.ts

+ 2 - 2
src/api/httputils.js

@@ -78,9 +78,9 @@ axiosservice.interceptors.response.use(
     },
     function (err) {
         if (err.response.status == 401) {
-            this.$store.state.commit('SETISREQUESTtAUTH', 'err')
+            store.commit('SETISREQUESTtAUTH', 'err');
             router.push({
-                path: '/404',
+                path: '404',
             })
         }
         return Promise.reject(err)

+ 0 - 3
src/main.ts

@@ -43,9 +43,6 @@ const username = 'lengqiang'
 //     }
 //     next()
 // })
-// setTimeout(()=>{
-//     store.commit('SETSSOTOKEN','123')
-// },5000)
 new Vue({
     router,
     store,