79 lines
1.9 KiB
JavaScript
79 lines
1.9 KiB
JavaScript
|
// +----------------------------------------------------------------------
|
|||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
// | Author: CRMEB Team <admin@crmeb.com>
|
|||
|
// +----------------------------------------------------------------------
|
|||
|
import Vue from 'vue'
|
|||
|
import App from './App'
|
|||
|
import store from './store'
|
|||
|
import Cache from './utils/cache'
|
|||
|
import util from 'utils/util'
|
|||
|
import {
|
|||
|
HTTP_REQUEST_URL
|
|||
|
} from '@/config/app';
|
|||
|
|
|||
|
import uView from '@/uni_modules/uview-ui'
|
|||
|
Vue.use(uView)
|
|||
|
|
|||
|
Vue.prototype.$util = util;
|
|||
|
Vue.prototype.$Cache = Cache;
|
|||
|
Vue.config.productionTip = false
|
|||
|
Vue.prototype.$bus = new Vue();
|
|||
|
// #ifdef H5
|
|||
|
import {
|
|||
|
parseQuery
|
|||
|
} from "./utils";
|
|||
|
|
|||
|
import {
|
|||
|
SPREAD
|
|||
|
} from './config/cache';
|
|||
|
// import wx from '@/node_modules/jweixin-module/lib/index'
|
|||
|
var __s = document.createElement('script');
|
|||
|
__s.src = HTTP_REQUEST_URL + "/api/script";
|
|||
|
document.head.appendChild(__s);
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
// 注册全局防抖指令
|
|||
|
Vue.directive('debounce', {
|
|||
|
inserted: (el, binding) => {
|
|||
|
let debounceTime = binding.value || 2000
|
|||
|
let timer
|
|||
|
el.addEventListener('click', e => {
|
|||
|
el.style.pointerEvents = 'none';
|
|||
|
if (!el.disabled) {
|
|||
|
timer = setTimeout(() => {
|
|||
|
el.style.pointerEvents = 'auto'
|
|||
|
}, debounceTime)
|
|||
|
}
|
|||
|
}, true)
|
|||
|
}
|
|||
|
})
|
|||
|
|
|||
|
// if(!!!Auth.isAndroid() && Auth.isWeixin()){
|
|||
|
// Auth.wechat()
|
|||
|
// }
|
|||
|
|
|||
|
// Auth.isWeixin() && Auth.oAuth();
|
|||
|
|
|||
|
// #endif
|
|||
|
|
|||
|
let appInfo = uni.getSystemInfo().then(res => {
|
|||
|
Vue.prototype.$appInfo = res[1];
|
|||
|
});
|
|||
|
|
|||
|
|
|||
|
App.mpType = 'app'
|
|||
|
|
|||
|
|
|||
|
const app = new Vue({
|
|||
|
...App,
|
|||
|
store,
|
|||
|
Cache
|
|||
|
})
|
|||
|
app.$mount();
|