You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
O1-mobile/src/main.js

61 lines
2.1 KiB
JavaScript

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
// import VConsole from "vconsole"
import { setLocalStorage, compressFile } from '@/utils'
import msgAlert, { handleForceCloseLoading } from './plugin/msgAlert'
import pluginPermission from '@/plugin/permission'
// 全局过滤器
import * as filters from './filters'
import 'vant/lib/index.css'
import 'nprogress/nprogress.css'
import VueClipboard from 'vue-clipboard2'
import VueTouch from "vue-touch"
import directive from './directive' // directive
import SlideVerify from 'vue-monoplasty-slide-verify';
import { DICT_TYPE, getDictDataLabel, getDictDatas, getDictDatas2 } from "@/utils/dict";
import { parseTime } from "@/utils/ruoyi";
import { Base64 } from 'js-base64'
Vue.prototype.$Base64 = Base64;
Vue.prototype.getDictDatas = getDictDatas
Vue.prototype.getDictDatas2 = getDictDatas2
Vue.prototype.getDictDataLabel = getDictDataLabel
Vue.prototype.DICT_TYPE = DICT_TYPE
Vue.prototype.parseTime = parseTime
Vue.use(SlideVerify);//滑块验证
Vue.use(VueTouch, { name: 'v-touch' })
Vue.use(Vant);
Vue.use(msgAlert)
Vue.use(directive)
Vue.prototype.$forceCloseLoading = handleForceCloseLoading
Vue.use(pluginPermission)
Vue.use(VueClipboard)
/* if (window.location.href.indexOf('localhost') === -1 && window.location.href.indexOf('www.joineast.com') === -1) {
new VConsole()
} */
Vue.prototype.$EventBus = new Vue() // 注册全局EventBus
Vue.prototype.$compressFile = compressFile
// 配置全局过滤器
Object.keys(filters).forEach(key => {
Vue.filter(key, filters[key])
})
new Vue({
router,
store,
render: h => h(App),
created() {
if (['development', 'test', 'sim'].includes(process.env.NODE_ENV)) {
console.log(`%c当前环境::%c${process.env.VUE_APP_ENVIRONMENT_TITLE}`, 'color: #0088fe;', 'color: #67C23A;')
console.log(`%c当前联调地址::${process.env.VUE_APP_APIURL}`, 'color: #0088fe;')
console.log(`%c当前已连接到%c${window.localStorage.getItem('AXIOS_JOINEAST_TARGET_TITLE') || '全部'}%c的电脑`, 'color: #0088fe;', 'color: #67C23A;', 'color: #0088fe;')
}
}
}).$mount('#app')