// The Vue build version to load with the `import` command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from "vue"; import App from "./App"; import router from "./router"; import axios from "axios"; import Cube from "./index"; import "lib-flexible"; import "./filters"; // import VConsole from "vconsole"; // import host from '../src/request/host' // import {get,post} from './service/http' // new VConsole(); Vue.use(Cube); // 修改请求接口(删掉地址栏中的app2) let domainName = document.domain; //域名 let protocolName = document.location.protocol; //http协议 axios.defaults.baseURL = protocolName + "//" + domainName; // axios.defaults.timeout = 5000; Vue.prototype.$http = axios; Vue.config.productionTip = false; Vue.prototype.$host = protocolName + "//" + domainName; Vue.prototype.$baseURL = protocolName + "//" + domainName; //因项目众多,前端为了加以区分,所以用域名加以判断,后期有更好的方式可以自行修改 // 中南财大 Vue.prototype.isZncd = document.domain === 'itsm.zuel.edu.cn'; /* eslint-disable no-new */ new Vue({ el: "#app", router, components: { App }, template: "" });