Files
RentWeAppFront/main.js
2026-01-15 17:18:24 +08:00

51 lines
1.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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()