mirror of
https://github.com/flipped-aurora/gin-vue-admin.git
synced 2026-09-20 20:19:56 +00:00
修复检测是否初始化时的判断
This commit is contained in:
@@ -65,7 +65,7 @@ service.interceptors.response.use(
|
||||
if (response.headers["new-token"]) {
|
||||
store.commit('user/setToken', response.headers["new-token"])
|
||||
}
|
||||
if (response.data.code == 0 || response.headers.success === "true") {
|
||||
if(response.data.code == 0){
|
||||
if(response.data.data.needInit){
|
||||
Message({
|
||||
type:"info",
|
||||
@@ -74,6 +74,8 @@ service.interceptors.response.use(
|
||||
store.commit("user/NeedInit")
|
||||
router.push({name:"init"})
|
||||
}
|
||||
}
|
||||
if (response.data.code == 0 || response.headers.success === "true") {
|
||||
return response.data
|
||||
} else {
|
||||
Message({
|
||||
|
||||
Reference in New Issue
Block a user