This commit is contained in:
oneao committed 2025-12-27 17:21:38 +08:00
1 parent 2f8a815c62
commit a09fdf0a66
127 files changed
+4518 -1159

No files matched your search

@@ -50,15 +50,15 @@ axiosInstance.interceptors.request.use(
if (needAuth) {
if (!userStore.isLogined) {
userStore.clearUserInfo()
userStore.clear()
router.push('/login')
return Promise.reject(new Error('尚未登录,请先登录!'))
}
}
config.headers.Authorization = `Bearer ${userStore.userInfo.token}`
config.headers['X-Company-Id'] = userStore.userInfo.company.id
config.headers['X-User-Id'] = userStore.userInfo.user.id
config.headers.Authorization = `Bearer ${userStore.token}`
config.headers['X-Company-Id'] = userStore.company.id
config.headers['X-User-Id'] = userStore.user.id
return config
},