增加测试环境,依赖去除pulic/config.json

master
wj 2 years ago
parent e64710a1b3
commit e575022c49

1
.gitignore vendored

@ -2,6 +2,7 @@
node_modules
/dist
/stage
/SP_SYNC_CLIENT
# local env files
.env.local

@ -6,7 +6,7 @@
* imgBaseUrl: 图片所在域名地址
*
*/
import "../../public/config"
//import "../../public/config"
let BASE_URL = process.env.VUE_APP_API_BASE;
// let ROUTER_MODE = "history";
let ROUTER_MODE = "";

@ -25,11 +25,12 @@ Object.keys(filters).forEach(key => {
Vue.config.productionTip = false;
let getUrl = "";
let BASE_URL = process.env.VUE_APP_API_BASE;
let startApp = function() {
console.log(window.global_config.BASE_URL);
axios.get("./config.json").then(res => {
// axios.get("./config.json").then(res => {
// 基础地址
getUrl = res.data.BASE_URL;
getUrl = BASE_URL;
myReq.defaults.baseURL = getUrl;
// mySock.ws_url = res.data.BASE_URL2;
console.log( res.data.BASE_URL+"\n"+ res.data.BASE_URL2)
@ -38,7 +39,7 @@ let startApp = function() {
store,
render: h => h(App)
}).$mount("#app");
});
// });
};
startApp();

Loading…
Cancel
Save