init
This commit is contained in:
43
main.js
Normal file
43
main.js
Normal file
@@ -0,0 +1,43 @@
|
||||
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"
|
||||
|
||||
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';
|
||||
Vue.use(httpInterceptor, app);
|
||||
|
||||
// 封装自定义提示框
|
||||
import $mytip from 'common/utils/tip.js'
|
||||
Vue.prototype.$mytip = $mytip
|
||||
|
||||
app.$mount()
|
||||
Reference in New Issue
Block a user