yuanhao 2 лет назад
Родитель
Сommit
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')