mirror of
http://36.133.248.69:3088/admin/RentWeAppFront.git
synced 2026-03-07 17:32:25 +08:00
51 lines
1.5 KiB
JavaScript
51 lines
1.5 KiB
JavaScript
import Vue from 'vue'
|
||
import App from './App'
|
||
import customNavbar from '@/components/navbar/customNavbar.vue'
|
||
import AuthLogin from "@/components/AuthPopup/AuthLogin.vue"
|
||
import PhoneSelect from "@/components/AuthPopup/PhoneSelect.vue"
|
||
import { ellipsisText } from '@/common/utils/text';
|
||
|
||
Vue.config.productionTip = false
|
||
|
||
App.mpType = 'app'
|
||
|
||
// 引入全局uView-plus
|
||
import uview from 'uview-ui'
|
||
Vue.use(uview)
|
||
|
||
// 此处为演示vuex使用,非uView的功能部分
|
||
import store from '@/store';
|
||
|
||
|
||
// 引入uView提供的对vuex的简写法文件
|
||
let vuexStore = require('@/store/$u.mixin.js');
|
||
Vue.mixin(vuexStore);
|
||
|
||
// 引入uView对小程序分享的mixin封装
|
||
let mpShare = require('uview-ui/libs/mixin/mpShare.js');
|
||
Vue.mixin(mpShare)
|
||
Vue.component('customNavbar', customNavbar)
|
||
Vue.component('AuthLogin', AuthLogin)
|
||
Vue.component('PhoneSelect', PhoneSelect)
|
||
const app = new Vue({
|
||
store,
|
||
...App
|
||
})
|
||
|
||
// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
|
||
import httpInterceptor from '@/common/http.interceptor.js';
|
||
// 挂载自定义 http 封装
|
||
|
||
Vue.use(httpInterceptor, app);
|
||
// 封装自定义提示框
|
||
import $mytip from '@/common/utils/tip.js'
|
||
import config from "@/common/config.js"
|
||
import { checkToken,getToken,getUserType } from '@/common/utils/auth.js'
|
||
Vue.prototype.$mytip = $mytip
|
||
Vue.prototype.$ellipsis = ellipsisText
|
||
Vue.prototype.$config = config
|
||
Vue.prototype.$checkToken = checkToken
|
||
Vue.prototype.$getToken = getToken
|
||
Vue.prototype.$getUserType = getUserType
|
||
app.$mount()
|