恢复正式接口调用判断

This commit is contained in:
fan 2023-03-09 10:20:56 +08:00
parent aa4ab3ce91
commit 4aa0474586
2 changed files with 6 additions and 5 deletions

View File

@ -37,7 +37,7 @@ export function handlerUrl() {
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
BASE_SITE = 'https://test.joylink.club/cbtc';
OSS_URL = 'https://192.168.3.233/oss-rtss';
} else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') {
} else if (process.env.NODE_ENV === 'test' && process.env.VUE_APP_PRO === 'local-test') {
// 本地打包测试分支
BASE_API = 'https://192.168.3.233/rtss-server'; // api地址
BASE_SITE = 'https://192.168.3.233/cbtc'; // 前端项目地址
@ -59,7 +59,8 @@ export function handlerUrl() {
OSS_URL = 'https://joylink.club/oss-rtss';
}
// VOICE_API, UPLOAD_API, BASE_SITE, PROD_API
return {BASE_API, BASE_SITE, OSS_URL};
const PROD_API = 'https://joylink.club/jlcloud';
return {BASE_API, BASE_SITE, OSS_URL, PROD_API};
}
// export function handlerUrl(data) {

View File

@ -36,9 +36,9 @@ service.interceptors.request.use(config => {
// if (config.upload) {
// config.baseURL = urlData.UPLOAD_API;
// }
// if (config.production) {
// config.baseURL = urlData.PROD_API;
// }
if (config.production) {
config.baseURL = urlData.PROD_API;
}
if (config.time) {
config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改