cyywl_server/yudao-ui-app/main.js

66 lines
1.7 KiB
JavaScript
Raw Normal View History

import Vue from 'vue'
2022-04-06 16:08:26 +08:00
import App from './App'
import store from './store'
2023-05-15 10:12:22 +08:00
import Cache from './utils/cache'
import util from 'utils/util'
import configs from './config/app.js'
import * as Order from './libs/order';
Vue.prototype.$util = util;
Vue.prototype.$config = configs;
Vue.prototype.$Cache = Cache;
Vue.prototype.$eventHub = new Vue();
2022-04-06 16:08:26 +08:00
Vue.config.productionTip = false
2023-05-15 10:12:22 +08:00
Vue.prototype.$Order = Order;
// #ifdef H5
import { parseQuery } from "./utils";
import Auth from './libs/wechat';
import { SPREAD } from './config/cache';
Vue.prototype.$wechat = Auth;
2023-05-25 15:35:02 +08:00
// let cookieName = "VCONSOLE",
// query = parseQuery(),
// urlSpread = query["spread"],
// // vconsole = query[cookieName.toLowerCase()],
// vconsole = "b14d1e9baeced9bb7525ab19ee35f2d2",
// md5Crmeb = "b14d1e9baeced9bb7525ab19ee35f2d2", //CRMEB MD5 加密开启vconsole模式
// md5UnCrmeb = "3dca2162c4e101b7656793a1af20295c"; //UN_CREMB MD5 加密关闭vconsole模式
2023-05-15 10:12:22 +08:00
2023-05-25 15:35:02 +08:00
// 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);
// }
// }
2023-05-15 10:12:22 +08:00
2023-05-25 15:35:02 +08:00
// if (vconsole !== undefined) {
// if (vconsole === md5UnCrmeb && Cache.has(cookieName))
// Cache.clear(cookieName);
// } else vconsole = Cache.get(cookieName);
2023-05-15 10:12:22 +08:00
import VConsole from './components/vconsole.min.js'
2023-05-25 15:35:02 +08:00
if (process.env.isVConsole) {
2023-05-15 10:12:22 +08:00
let vConsole = new VConsole();
}
// Auth.isWeixin() && Auth.oAuth();
// #endif
2022-04-06 16:08:26 +08:00
App.mpType = 'app'
2023-05-15 10:12:22 +08:00
2023-05-16 18:22:32 +08:00
import uView from 'uni_modules/uview-ui'
Vue.use(uView)
uni.$u.config.unit = 'rpx'
2022-04-06 16:08:26 +08:00
const app = new Vue({
2023-05-15 10:12:22 +08:00
...App,
store,
2023-05-15 10:12:22 +08:00
Cache
2022-04-06 16:08:26 +08:00
})
2023-05-15 10:12:22 +08:00
app.$mount();