perf: 许可证机制

This commit is contained in:
fit2cloud-chenyw
2023-12-04 12:15:49 +08:00
parent e701b54d08
commit f6b34ffe12
5 changed files with 17 additions and 22 deletions

View File

@@ -143,6 +143,15 @@ service.interceptors.response.use(
message: response.data.msg,
showClose: true
})
if (response.data.code === 80001) {
// localStorage.clear()
localStorage.setItem('DE-GATEWAY-FLAG', response.data.msg)
let queryRedirectPath = '/workbranch/index'
if (router.currentRoute.value.fullPath) {
queryRedirectPath = router.currentRoute.value.fullPath as string
}
router.push(`/login?redirect=${queryRedirectPath}`)
}
}
return Promise.reject(response.data.msg)