|
@@ -3,8 +3,7 @@ import { MessageBox, Message } from 'element-ui'
|
|
|
import store from '@/store'
|
|
|
import { getToken } from '@/utils/auth'
|
|
|
import { waitLogOut } from '@/utils/waitLogOut'
|
|
|
-var baseURLStr = window.g.ApiUrl
|
|
|
-// var baseURLStr = window.g.ApiUrl
|
|
|
+
|
|
|
let start = 0;
|
|
|
function showErr(res, duration) {
|
|
|
let now = Date.now();
|
|
@@ -20,7 +19,7 @@ function showErr(res, duration) {
|
|
|
|
|
|
// create an axios instance
|
|
|
const service = axios.create({
|
|
|
- baseURL: baseURLStr, // url = base url + request url
|
|
|
+ baseURL: process.env.VUE_APP_BASE_API, // url = base url + request url
|
|
|
// withCredentials: true, // send cookies when cross-domain requests
|
|
|
timeout: 200000 // request timeout
|
|
|
})
|