baseUrl.js
1.03 KB
/*
* @Author: your name
* @Date: 2021-08-10 14:14:27
* @LastEditTime: 2021-11-11 12:15:46
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /fanxing_new/src/api/baseUrl.js
*/
let baseUrl = "/api"; // 本地代理
import axios from "axios";
switch (process.env.NODE_ENV) {
case "development":
// baseUrl = "http://192.168.9.234:20080"; // 测试环境url
// baseUrl = window.config.https ? "https://192.168.9.245:20070" : "http://192.168.9.233:20080"; // 测试环境url
// baseUrl = "http://192.168.9.82:8080"; // 测试环境url
baseUrl = "http://123.6.38.39:20080";
// baseUrl = 'http://vion-panda.51vip.biz:52510';
break;
case "pre":
baseUrl = "https://pre-server.feleti.cn"; // 预上线环境url
break;
case "production":
baseUrl = window.config.https ? `https://${location.host}` : `http://${location.host}`; // 生产环境url
break;
}
export default baseUrl;