|
@@ -7,7 +7,6 @@ export function axiosHttp(store, req) {
|
|
|
baseUrl: '/'
|
|
baseUrl: '/'
|
|
|
})
|
|
})
|
|
|
service.interceptors.request.use(config => {
|
|
service.interceptors.request.use(config => {
|
|
|
- // console.log(config.url)
|
|
|
|
|
if (process.server) {
|
|
if (process.server) {
|
|
|
const cookie = req.headers['cookie']
|
|
const cookie = req.headers['cookie']
|
|
|
store.commit('option/SET_COOKIES', cookie)
|
|
store.commit('option/SET_COOKIES', cookie)
|
|
@@ -17,7 +16,13 @@ export function axiosHttp(store, req) {
|
|
|
config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
|
|
config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
|
|
|
config.headers['User-Agent'] = store.state.option.userAgent
|
|
config.headers['User-Agent'] = store.state.option.userAgent
|
|
|
}
|
|
}
|
|
|
- // console.log(config.headers)
|
|
|
|
|
|
|
+ console.log(config.url)
|
|
|
|
|
+ // if (typeof window === 'undefined') {
|
|
|
|
|
+ // config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
|
|
|
|
|
+ // // config.headers['User-Agent'] = Vue.$store.state.option.userAgent
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // console.log(store)
|
|
|
|
|
+ // }
|
|
|
return config
|
|
return config
|
|
|
}, error => {
|
|
}, error => {
|
|
|
return Promise.reject(error)
|
|
return Promise.reject(error)
|