You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import "babel-polyfill"; // 解决Ie9
|
|
|
|
|
import Vue from "vue";
|
|
|
|
|
import App from "./App.vue";
|
|
|
|
|
import router from "./router/index";
|
|
|
|
|
import store from "./store/index";
|
|
|
|
|
import "./element";
|
|
|
|
|
import * as filters from "./filtres/index"; // 全局过滤器
|
|
|
|
|
import "./role"; // 权限
|
|
|
|
|
import allTools from "./plugin/allTools";
|
|
|
|
|
// import "./mock"; // 模拟数据
|
|
|
|
|
|
|
|
|
|
import "./assets/icons/iconfont";
|
|
|
|
|
import IconSvg from "./components/common/IconSvg.vue"; // svg组件
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
import "../public/config.json";
|
|
|
|
|
import myReq from "./utils/axios";
|
|
|
|
|
import myReq2 from "./utils/axios2";
|
|
|
|
|
// 注册全局组件(register global)
|
|
|
|
|
Vue.component("icon-svg", IconSvg);
|
|
|
|
|
Vue.use(allTools);
|
|
|
|
|
// 注册全局实用程序过滤器(register global utility filters).
|
|
|
|
|
Object.keys(filters).forEach(key => {
|
|
|
|
|
Vue.filter(key, filters[key]);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
|
let getUrl = "";
|
|
|
|
|
let startApp = function () {
|
|
|
|
|
console.log(window.global_config.BASE_URL);
|
|
|
|
|
axios.get("./config.json").then(res => {
|
|
|
|
|
// 基础地址
|
|
|
|
|
getUrl = res.data.BASE_URL;
|
|
|
|
|
myReq.defaults.baseURL = getUrl;
|
|
|
|
|
myReq2.defaults.baseURL = res.data.UDI_SYNC_SERVER_IP;
|
|
|
|
|
console.log(res.data.BASE_URL + "\n")
|
|
|
|
|
new Vue({
|
|
|
|
|
router,
|
|
|
|
|
store,
|
|
|
|
|
render: h => h(App)
|
|
|
|
|
}).$mount("#app");
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
startApp();
|