Commit 5df8bc0d by hank

bug

parent e29766d1
...@@ -44,11 +44,11 @@ axios.interceptors.response.use( ...@@ -44,11 +44,11 @@ axios.interceptors.response.use(
return response return response
} else { } else {
response.status = 400 response.status = 400
Toast({ // Toast({
message: response.data.msg, // message: response.data.msg,
position: 'center', // position: 'center',
duration: 2 * 1000 // duration: 2 * 1000
}) // })
if(response.data.code == 100100 || response.data.code == 100101) { if(response.data.code == 100100 || response.data.code == 100101) {
store.dispatch('getAuth').then() store.dispatch('getAuth').then()
} }
...@@ -122,11 +122,11 @@ axios.interceptors.response.use( ...@@ -122,11 +122,11 @@ axios.interceptors.response.use(
break break
} }
} }
Toast({ // Toast({
message: err.message, // message: err.message,
position: 'center', // position: 'center',
duration: 3 * 1000 // duration: 3 * 1000
}) // })
// Toast.fail(err.message) // Toast.fail(err.message)
console.log('❎❎', err.message) console.log('❎❎', err.message)
......
...@@ -88,8 +88,8 @@ export default new Vuex.Store({ ...@@ -88,8 +88,8 @@ export default new Vuex.Store({
}, },
actions: { actions: {
getAuth({commit,state}) { getAuth({commit,state}) {
if (!state.isAuth) { if (state.isAuth) {
return new Promise() return
} }
window.localStorage.removeItem('token') window.localStorage.removeItem('token')
window.localStorage.removeItem('type') 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