1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- import Vue from 'vue'
- import App from './App'
- import store from './store' // store
- import plugins from './plugins' // plugins
- import './permission' // permission
- // import uView from 'uview-ui'
- import uView from '@/uni_modules/uview-ui'
- import $ from '@/pages/common/fun.js'
- // 在main.js中注册全局组件
- import isLodingModel from './components/loading/loading.vue'
- Vue.component('isLodingModel', isLodingModel)
- // import navInfo from "@/pagesA/components/my-nav/nav.vue"
- // Vue.component('navInfo', navInfo)
- Vue.use(uView)
- Vue.use(plugins)
- Vue.config.productionTip = false
- Vue.prototype.$store = store
- Vue.prototype.$ = $
- Vue.prototype.$screenHeight = uni.getSystemInfoSync().windowHeight
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #ifdef H5
- Vue.mixin({
- mounted() {
- if (this.isWeiXinBrowser() && !this.isCustomNav()) {
- this.navTitle()
- }
- },
- methods: {
- isWeiXinBrowser() {
- let ua = navigator.userAgent.toLowerCase()
- return ua.indexOf('micromessenger') != -1
- },
- isCustomNav() {
- return this.$mp && this.$mp.appOptions && this.$mp.appOptions.window && this.$mp.appOptions.window.navigationStyle === 'custom';
- },
- navTitle() {
- this.$nextTick(() => {
- let navTitleDom = document.getElementsByTagName('uni-page-head')
- if (navTitleDom.length) {
- navTitleDom[0].style.display = 'none'
- if (typeof wx !== 'undefined' && wx.hideNavigationBarLoading) {
- wx.hideNavigationBarLoading()
- }
- }
- })
- }
- }
- })
- // #endif
|