|
|
@@ -20,7 +20,9 @@ instance.interceptors.request.use(
|
|
|
(config) => {
|
|
|
config.headers['Accept'] = ''
|
|
|
config.headers['X-Requested-With'] = 'XMLHttpRequest'
|
|
|
- config.headers[localStorage.getItem('tokenName')] = localStorage.getItem('tokenValue')
|
|
|
+ if(config.url!='api/system/login'){
|
|
|
+ config.headers[localStorage.getItem('tokenName')] = localStorage.getItem('tokenValue')
|
|
|
+ }
|
|
|
return config
|
|
|
},
|
|
|
(error) => {
|
|
|
@@ -64,6 +66,7 @@ function fetch(ourl, params = {}, methods = 'post') {
|
|
|
}
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
+ useToast().init({ title: '提示', message: err.message, duration: 2000, color: '#E42222', closeable: false })
|
|
|
reject(err)
|
|
|
})
|
|
|
})
|