import Vue from 'vue' import 'normalize.css/normalize.css' // A modern alternative to CSS resets import ElementUI from 'element-ui' import 'element-ui/lib/theme-chalk/index.css' // import locale from 'element-ui/lib/locale/lang/en' // lang i18n import echarts from 'echarts' import '@/styles/index.scss' // global css import '@/customIcons/icon.css' // 自定义icon import '@/assets/font.css' import App from './App.vue' import store from './store' import router from './router' import { VueJsonp } from 'vue-jsonp' Vue.use(VueJsonp); import '@/icons' // icon import '@/permission' // permission control import { env } from 'echarts/lib/export' /** * If you don't want to use mock-server * you want to use MockJs for mock api * you can execute: mockXHR() * * Currently MockJs will be used in the production environment, * please remove it before going online ! ! ! */ Vue.prototype.$echarts = echarts // Vue.prototype.$API = 'https://h5.028wlkj.com/cdwlMall/meserver/api' Vue.prototype.$hostUrl =`${window.location.protocol}//${window.location.host}/cdwlMall` import { sendToUser } from '@/api/newly.js' Vue.prototype.$setmsg = async function(from) { let info = { "content":JSON.stringify(from.content), // 消息内容 "messageClass": 1, // 消息类型(1:指定用户发送) "messageType":from.type, // 消息类型描述 "cereMessageReceipts": [ // 接收人列表 { "phone": from.phone, // 用户ID "messageType": from.type, // 消息类型 "content": JSON.stringify(from.content) // 消息内容 } ] } let c1 = await sendToUser(info).then(res => { console.error(res) return res }) return c1 }; let host = window.location.host; if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost:9528'|| host === '192.168.31.45:9528'|| host === 'localhost:9529' ) { // Vue.prototype.$baseURL ='https://jy.scjysm.asia:18086/cdwlMall' // Vue.prototype.$fontBold = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` // Vue.prototype.$fontRegular = `https://jy.scjysm.asia:18086/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf` // Vue.prototype.$API = `https://jy.scjysm.asia:18086/cdwlMall/meserver/api` Vue.prototype.$baseURL ='https://zhgw-uat.028wlkj.com/cdwlMall' Vue.prototype.$fontBold = `https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` Vue.prototype.$fontRegular = `https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf` Vue.prototype.$API = `https://zhgw-uat.028wlkj.com/cdwlMall/meserver/api` } else { Vue.prototype.$API = `${window.location.protocol}//${window.location.host}/cdwlMall/meserver/api` Vue.prototype.$baseURL =`${window.location.protocol}//${window.location.host}/cdwlMall` Vue.prototype.$fontBold = `${window.location.protocol}//${window.location.host}/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Bold.ttf` Vue.prototype.$fontRegular = `${window.location.protocol}//${window.location.host}/cdwlMall/zsfwzxt/assets/Alibaba-PuHuiTi-Regular.ttf` } // Vue.prototype.$baseURL =`https://zhld.028wlkj.com:49008` // Vue.prototype.$API = 'http://172.16.61.48/meserver/api' // Vue.prototype.$API = 'https://jy.scjysm.asia:18086/meserver/api' // Vue.prototype.$API = 'https://h5.028wlkj.com/cdwlMall/meserver/api' // Vue.prototype.$API = 'http://8.130.38.56:8019/api' // https://jy.scjysm.asia:18086 http://172.16.61.126:8080 http://8.130.38.56:8027 // if (process.env.NODE_ENV === 'production') { // const { mockXHR } = require('../mock') // mockXHR() // } // set ElementUI lang to EN // Vue.use(ElementUI, { locale }) // 如果想要中文版 element-ui,按如下方式声明 Vue.use(ElementUI) Vue.config.productionTip = false new Vue({ el: '#app', router, store, render: h => h(App) })