yuanhao пре 2 година
родитељ
комит
b111e5d4a9
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      in-client-qn-ui/src/utils/request.js

+ 2 - 1
in-client-qn-ui/src/utils/request.js

@@ -34,7 +34,8 @@ const handleCode = (code, msg) => {
       }
       break
     case noPermissionCode:
-      router.push({ path: '/401' }).catch(() => {})
+      store.dispatch('user/resetAccessToken').catch(() => {})
+      router.push({ path: '/login' }).catch(() => {})
       break
     default:
       Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, 'error')