添加日志记录
This commit is contained in:
@@ -16,7 +16,7 @@ function getUserToken(){
|
||||
|
||||
var bmsAxios = axios.create({
|
||||
// timeout: 120000,
|
||||
withCredentials: true,
|
||||
// withCredentials: true,
|
||||
baseURL: http.baseURL,
|
||||
headers: {
|
||||
post: {
|
||||
@@ -117,6 +117,9 @@ export function post(url, params) {
|
||||
return new Promise((resolve, reject) => {
|
||||
bmsAxios.post(url, params).then(
|
||||
response => {
|
||||
if (response.data.Code == 20000) {
|
||||
return;
|
||||
}
|
||||
if (response.data.Code == 10000) {
|
||||
Message.success("操作成功")
|
||||
return resolve(response.data);
|
||||
@@ -313,7 +316,7 @@ export function upload(url, uconfig) {
|
||||
onStart && onStart(uuid, file);
|
||||
|
||||
var uploadAxios = axios.create({
|
||||
withCredentials: true,
|
||||
// withCredentials: true,
|
||||
baseURL: http.baseURL
|
||||
});
|
||||
uploadAxios.post(url, formData, config).then(
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
//npm run build -- dev
|
||||
//npm run build -- test
|
||||
//npm run build -- prod
|
||||
// npm run build -- dev
|
||||
// npm run build -- test
|
||||
// npm run build -- prod
|
||||
|
||||
const devUrlNew ='http://localhost:5000/api/'
|
||||
const testUrlNew = "http://localhost:5000/api/"
|
||||
const prodUrlNew ="http://www.juip.com/api/";// "http://api.yk.hncore.net/api/"/"http://hapi.hncore.net/api"
|
||||
const devUrlNew = 'http://localhost:5000/api/'
|
||||
const testUrlNew = 'http://localhost:5000/api/'
|
||||
const prodUrlNew = 'http://www.juip.com/api/'// "http://api.yk.hncore.net/api/"/"http://hapi.hncore.net/api"
|
||||
|
||||
var baseURL = devUrlNew
|
||||
|
||||
var baseURL= devUrlNew
|
||||
switch (process.env.NODE_ENV) {
|
||||
case "development":
|
||||
baseURL =devUrlNew
|
||||
break;
|
||||
case "test":
|
||||
baseURL =testUrlNew
|
||||
break;
|
||||
case "production":
|
||||
baseURL = prodUrlNew
|
||||
break;
|
||||
case 'development':
|
||||
baseURL = devUrlNew
|
||||
break
|
||||
case 'test':
|
||||
baseURL = testUrlNew
|
||||
break
|
||||
case 'production':
|
||||
baseURL = prodUrlNew
|
||||
break
|
||||
}
|
||||
export {
|
||||
baseURL
|
||||
};
|
||||
baseURL
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user