yuanhao 2 năm trước cách đây
mục cha
commit
b111e5d4a9
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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')