瀏覽代碼

perf: 处理发布失败

wangcz 7 年之前
父節點
當前提交
c95a37f03e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      plugins/city-service.js

+ 3 - 3
plugins/city-service.js

@@ -1,5 +1,5 @@
 import axios from 'axios'
 import axios from 'axios'
-import store from '~store'
+// import store from '~store'
 
 
 const service = axios.create({
 const service = axios.create({
   withCredentials: true,
   withCredentials: true,
@@ -10,8 +10,8 @@ service.interceptors.request.use(config => {
   // is server render, use ${baseUrl} directly rather than ${proxyUrl}
   // is server render, use ${baseUrl} directly rather than ${proxyUrl}
   if (typeof window === 'undefined') {
   if (typeof window === 'undefined') {
     config.url = process.env.baseUrl + '/city/' + process.env.cityDomain + config.url
     config.url = process.env.baseUrl + '/city/' + process.env.cityDomain + config.url
-    config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
-    config.headers['User-Agent'] = store.state.option.userAgent
+    // config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
+    // config.headers['User-Agent'] = store.state.option.userAgent
   } else {
   } else {
     config.url = '/city/' + process.env.cityDomain + config.url
     config.url = '/city/' + process.env.cityDomain + config.url
   }
   }