Commit 5df8bc0d by hank

bug

parent e29766d1
......@@ -44,11 +44,11 @@ axios.interceptors.response.use(
return response
} else {
response.status = 400
Toast({
message: response.data.msg,
position: 'center',
duration: 2 * 1000
})
// Toast({
// message: response.data.msg,
// position: 'center',
// duration: 2 * 1000
// })
if(response.data.code == 100100 || response.data.code == 100101) {
store.dispatch('getAuth').then()
}
......@@ -122,11 +122,11 @@ axios.interceptors.response.use(
break
}
}
Toast({
message: err.message,
position: 'center',
duration: 3 * 1000
})
// Toast({
// message: err.message,
// position: 'center',
// duration: 3 * 1000
// })
// Toast.fail(err.message)
console.log('❎❎', err.message)
......
......@@ -88,8 +88,8 @@ export default new Vuex.Store({
},
actions: {
getAuth({commit,state}) {
if (!state.isAuth) {
return new Promise()
if (state.isAuth) {
return
}
window.localStorage.removeItem('token')
window.localStorage.removeItem('type')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment