import Vue from 'vue' import App from './App' import store from './store' import Cache from './utils/cache' import util from 'utils/util' import configs from './config/app.js' import global from './libs/global.js' import apps from './libs/apps.js' //校验登录是否失效 import * as Order from './libs/order'; import skeleton from './components/skeleton/index.vue' import uView from "uview-ui"; // import dLoading from '@/uni_modules/d-loading/components/d-loading/d-loading.vue' // Vue.component('dLoading',dLoading) Vue.component('skeleton', skeleton) Vue.prototype.$util = util; Vue.prototype.$config = configs; Vue.prototype.$Cache = Cache; Vue.prototype.$eventHub = new Vue(); Vue.config.productionTip = false Vue.prototype.$Order = Order; Vue.prototype.$LoginAuth = apps; Vue.use(uView); // #ifdef H5 import { parseQuery } from "./utils"; import Auth from './libs/wechat'; import {VueJsonp} from 'vue-jsonp' import { SPREAD,CHANNELID } from './config/cache'; Vue.use(VueJsonp) Vue.prototype.$wechat = Auth; let cookieName = "VCONSOLE", query = parseQuery(), urlSpread = query["spread"], urlChannelId = query["channelId"], vconsole = query[cookieName.toLowerCase()], md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式 md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式 if (urlSpread) { urlSpread = parseInt(urlSpread); Cache.setItem({ name: 'spread', value: urlSpread, }) } if (urlChannelId) { urlChannelId = parseInt(urlChannelId); Cache.setItem({ name: 'channelId', value: urlChannelId, }) } if (vconsole !== undefined) { if (vconsole === md5UnCrmeb && Cache.has(cookieName)) Cache.clear(cookieName); } else vconsole = Cache.get(cookieName); import VConsole from './components/vconsole.min.js' if (vconsole !== undefined && vconsole === md5Crmeb) { Cache.set(cookieName, md5Crmeb, 3600); let vConsole = new VConsole(); } // #endif App.mpType = 'app' const app = new Vue({ ...App, store, Cache }) app.$mount();