|
|
@@ -17,6 +17,8 @@ service.interceptors.request.use(config => {
|
|
|
}
|
|
|
config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
|
|
|
config.headers['User-Agent'] = store.state.option.userAgent
|
|
|
+ } else {
|
|
|
+ document.getElementById('loading').setAttribute('class', 'loading in')
|
|
|
}
|
|
|
return config
|
|
|
}, error => {
|
|
|
@@ -37,6 +39,9 @@ service.interceptors.response.use(response => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (typeof window !== 'undefined') {
|
|
|
+ document.getElementById('loading').setAttribute('class', 'loading')
|
|
|
+ }
|
|
|
return response
|
|
|
}, error => {
|
|
|
return Promise.reject(error)
|