正式环境接口地址修改

main
吕天方 2 weeks ago
parent f33a6af9da
commit 9c2eacaca0

@ -15,7 +15,8 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
// 创建axios实例
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: process.env.VUE_APP_BASE_API,
baseURL: process.env.NODE_ENV === "production" ? location.origin + '/api' : process.env.VUE_APP_BASE_API,
// 超时
timeout: 50000
})

@ -239,7 +239,8 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetEmail/importData"
// url: process.env.VUE_APP_BASE_API + "/tc/assetEmail/importData"
url: location.origin + "/api/tc/assetEmail/importData"
},
}
},

@ -258,7 +258,8 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
// url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
url: location.origin + "/api/tc/assetCurrent/importData"
},
}
},

@ -265,7 +265,8 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetApp/importData"
// url: process.env.VUE_APP_BASE_API + "/tc/assetApp/importData"
url: location.origin + "/api/tc/assetApp/importData"
},
}
},

@ -251,7 +251,8 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetOfficialAccount/importData"
// url: process.env.VUE_APP_BASE_API + "/tc/assetOfficialAccount/importData"
url: location.origin + "/api/tc/assetOfficialAccount/importData"
},
}
},

@ -250,7 +250,8 @@ export default {
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/miniPrograms/importData"
// url: process.env.VUE_APP_BASE_API + "/tc/miniPrograms/importData"
url: location.origin + "/api/tc/miniPrograms/importData"
},
}
},

@ -67,8 +67,10 @@ export default {
return {
number: 0,
uploadList: [],
baseUrl: process.env.VUE_APP_BASE_API,
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
// baseUrl: process.env.VUE_APP_BASE_API,
baseUrl: location.origin,
// uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //
uploadFileUrl: location.origin + '/api/common/upload',
headers: {
Authorization: "Bearer " + getToken(),
},

Loading…
Cancel
Save