2020-08-13 08:12:57 +00:00
|
|
|
import Vue from 'vue'
|
|
|
|
import App from './App'
|
|
|
|
import store from './store'
|
|
|
|
import Cache from './utils/cache'
|
|
|
|
import util from 'utils/util'
|
2020-09-15 08:13:25 +00:00
|
|
|
import configs from './config/app.js'
|
2021-06-11 09:41:16 +00:00
|
|
|
import * as Order from './libs/order';
|
2020-08-13 08:12:57 +00:00
|
|
|
|
|
|
|
Vue.prototype.$util = util;
|
2020-09-15 08:13:25 +00:00
|
|
|
Vue.prototype.$config = configs;
|
2020-08-13 08:12:57 +00:00
|
|
|
Vue.prototype.$Cache = Cache;
|
|
|
|
Vue.prototype.$eventHub = new Vue();
|
|
|
|
Vue.config.productionTip = false
|
2021-06-11 09:41:16 +00:00
|
|
|
Vue.prototype.$Order = Order;
|
2020-08-13 08:12:57 +00:00
|
|
|
|
|
|
|
// #ifdef H5
|
|
|
|
import { parseQuery } from "./utils";
|
|
|
|
import Auth from './libs/wechat';
|
|
|
|
import { SPREAD } from './config/cache';
|
|
|
|
Vue.prototype.$wechat = Auth;
|
|
|
|
let cookieName = "VCONSOLE",
|
|
|
|
query = parseQuery(),
|
|
|
|
urlSpread = query["spread"],
|
|
|
|
vconsole = query[cookieName.toLowerCase()],
|
2023-08-31 11:21:22 +00:00
|
|
|
md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式 TODO 芋艿:这个是啥,后面研究下
|
2020-08-13 08:12:57 +00:00
|
|
|
md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
|
|
|
|
|
|
|
|
if (urlSpread !== undefined) {
|
|
|
|
var spread = Cache.get(SPREAD);
|
|
|
|
urlSpread = parseInt(urlSpread);
|
|
|
|
if (!Number.isNaN(urlSpread) && spread !== urlSpread) {
|
|
|
|
Cache.set("spread", urlSpread || 0);
|
|
|
|
} else if (spread === 0 || typeof spread !== "number") {
|
|
|
|
Cache.set("spread", urlSpread || 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
|
2021-06-11 09:41:16 +00:00
|
|
|
// Auth.isWeixin() && Auth.oAuth();
|
2020-08-13 08:12:57 +00:00
|
|
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
App.mpType = 'app'
|
|
|
|
|
|
|
|
|
|
|
|
const app = new Vue({
|
|
|
|
...App,
|
|
|
|
store,
|
|
|
|
Cache
|
|
|
|
})
|
2020-08-26 10:02:40 +00:00
|
|
|
app.$mount();
|