12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- // #ifndef VUE3
- import Vue from 'vue'
- import App from './App'
- Vue.config.productionTip = false
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- import App from './App.vue'
- export function createApp() {
- const app = createSSRApp(App)
- return {
- app
- }
- }
- // #endif
- Vue.mixin({
- mounted() {
- if (this.isWeiXinBrowser() || this.isQQBrowser()) {
- this.navTitle()
- }
- },
- methods: {
- isWeiXinBrowser() {
- let ua = navigator.userAgent.toLowerCase()
- return ua.indexOf('micromessenger') != -1
- },
- isQQBrowser() {
- var ua = navigator.userAgent.toLowerCase()
- if (ua.match(/QQ/i) == "qq") {
- return true
- } else {
- return false
- }
- },
- navTitle() {
- this.$nextTick(() => {
- let navTitleDom = document.getElementsByTagName('uni-page-head')
- if (navTitleDom.length) {
- navTitleDom[0].style.display = 'none'
- }
- })
- }
- }
- })
|