refactor(src/utils/request.js): 优化拦截操作

duizhaopin_ui
duan 2 years ago
parent dc49a1097e
commit cd17126df0

@ -69,9 +69,7 @@ service.interceptors.response.use(
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
store.dispatch('user/resetToken').then(() => { store.commit('user/RESET_STATE')
location.reload()
})
}) })
} }
return Promise.reject(new Error(res.msg || 'Error')) return Promise.reject(new Error(res.msg || 'Error'))

Loading…
Cancel
Save