Add login and logout notification

This commit is contained in:
2023-10-30 00:26:19 +08:00
parent 5d71433d63
commit fcd4fd532c
10 changed files with 134 additions and 25 deletions

View File

@@ -44,7 +44,7 @@ service.interceptors.request.use(
.get(import.meta.env.VITE_API_TOKEN_URL, {
headers: { Authorization: `Bearer ${token}` }
})
.then((value: AxiosResponse<_Response<Token>>) => {
.then((value: AxiosResponse<_Response<TokenVo>>) => {
const response = value.data
if (response.code === SYSTEM_TOKEN_RENEW_SUCCESS) {
setToken(response.data?.token ?? '')