|
|
@ -3,7 +3,7 @@ import axiosMiniprogramAdapter from "axios-miniprogram-adapter"; |
|
|
|
import utils from "@/utils/encode"; |
|
|
|
import utils from "@/utils/encode"; |
|
|
|
let env; |
|
|
|
let env; |
|
|
|
env = "test"; |
|
|
|
env = "test"; |
|
|
|
// env = "production";
|
|
|
|
env = "production"; |
|
|
|
let testUrl = "http://192.168.110.77:38080"; |
|
|
|
let testUrl = "http://192.168.110.77:38080"; |
|
|
|
|
|
|
|
|
|
|
|
let productUrl = "http://uat.xingoil.com/guest-api"; |
|
|
|
let productUrl = "http://uat.xingoil.com/guest-api"; |
|
|
@ -12,7 +12,7 @@ let productUrl = "http://uat.xingoil.com/guest-api"; |
|
|
|
const instance = axios.create({ |
|
|
|
const instance = axios.create({ |
|
|
|
baseURL: env == "production" ? productUrl : testUrl, |
|
|
|
baseURL: env == "production" ? productUrl : testUrl, |
|
|
|
adapter: axiosMiniprogramAdapter, |
|
|
|
adapter: axiosMiniprogramAdapter, |
|
|
|
timeout: 5000, |
|
|
|
timeout: 10000, |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
instance.interceptors.request.use( |
|
|
|
instance.interceptors.request.use( |
|
|
|