feat:天平连接

This commit is contained in:
houjunxiang
2025-10-10 18:16:14 +08:00
parent 2b50debcd3
commit c8b2d8683e
16 changed files with 182 additions and 622 deletions

View File

@@ -130,6 +130,8 @@ http.interceptors.response.use(
// $store('user').setToken(response.header.authorization || response.header.Authorization)
// }
const userStore = $store('user')
const isLogin = userStore.isLogin
response.config.custom.showLoading && closeLoading()
console.log('response', JSON.parse(JSON.stringify(response.data)))
@@ -193,6 +195,9 @@ http.interceptors.response.use(
title: msg || response.config.custom.errorMsg,
icon: 'none'
})
if (code === 401) {
userStore.logout(true)
}
}
if ((code === 0 || code === 200) && response.config.custom.showSuccess) {