| | |
| | | console.log(code, msg); |
| | | switch (code) { |
| | | case invalidCode: |
| | | console.log(code); |
| | | Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error"); |
| | | store.dispatch("user/resetAccessToken").catch(() => {}); |
| | | if (loginInterception) { |
| | |
| | | } |
| | | break; |
| | | case noPermissionCode: |
| | | router.push({ path: "/login" }).catch(() => {}); |
| | | console.log(code); |
| | | store.dispatch("user/logout").then(() => { |
| | | router.push({ path: "/login" }).catch(() => {}); |
| | | }); |
| | | break; |
| | | default: |
| | | console.log(code); |
| | | Vue.prototype.$baseMessage(msg || `后端接口${code}异常`, "error"); |
| | | break; |
| | | } |