Browse Source

管理后台-接口域名

panyong 3 years ago
parent
commit
356066b80d
1 changed files with 0 additions and 3 deletions
  1. 0 3
      htmldev/manage/src/api/index.js

+ 0 - 3
htmldev/manage/src/api/index.js

@@ -3,15 +3,12 @@ import axios from 'axios'
 import { Message } from 'element-ui'
 import store from '../store/index'
 import { getToken } from '@/utils/auth'
-import { envDomain } from '@/utils/.env.domain'
 
 // axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
 // axios.defaults.withCredentials = false
 axios.defaults.timeout = 20000
 
 axios.interceptors.request.use(config => {
-    // 设置请求域名
-    config.baseURL = process.env.VUE_APP_ISPROXY * 1 ? '' : /\/api\/auth/.test(config.url) ? envDomain.API_AUTH : envDomain.API_DOMAIN
     if (getToken()) {
       config.headers['token'] = getToken()
     }