| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import Vue from 'vue'
- import App from './App'
- import constants from '@/constant/index'
- Vue.prototype.$constant = constants
- import './static/iconfont/iconfont.css'
- import '@/filters/index'
- import util from './utils/util'
- Vue.prototype.$util = util
- import globalMixins from './mixins/globalMixins'
- Vue.mixin(globalMixins)
- import tabBar from './components/app-tabbar.vue'
- Vue.component('tab-bar', tabBar)
- import store from './store'
- Vue.prototype.$store = store
- // 阻止启动生产消息,常用作指令
- Vue.config.productionTip = false
- // 封装得全局消息提示
- Vue.prototype.$msg = (title) => (
- uni.showToast({
- title,
- icon: 'none'
- })
- )
- // 生产环境中控制台不打印普通信息,以免造成内存泄漏
- if (process.env.NODE_ENV == 'production') {
- if (console) {
- console.log = () => {}
- }
- }
- // Vue.prototype.$backgroundAudioData = {
- // playing: false,
- // playTime: 0,
- // formatedPlayTime: '00:00:00'
- // }
- // Vue.component('page-head', pageHead)
- // Vue.component('page-foot', pageFoot)
- // Vue.component('uLink', uLink)
- App.mpType = 'app'
- const app = new Vue({
- store,
- ...App
- })
- app.$mount()
|