import Vue from 'vue' import App from './App' import store from './store' import '@/static/font/iconfont.css' import { getDay,NumberHandle,isChn,formatNum,formateHours } from '@/config/common.js' import pageHead from '@/components/page-head.vue' Vue.component('page-head', pageHead) Vue.config.productionTip = false Vue.prototype.$getDay = getDay; Vue.prototype.$formatNum = formatNum; Vue.prototype.$NumberHandle = NumberHandle; Vue.prototype.$store = store //app.vue里的onLaunch中如果有异步方法,比如登录方法,返回结果可能会在页面的 onLoad 之后,为了让页面的 onLoad 在 onLaunch 之后执行 https://blog.csdn.net/weixin_39152200/article/details/109179581 Vue.prototype.$onLaunched = new Promise(resolve=>{ Vue.prototype.$isResolve = resolve }) // Vue.prototype.$backgroundAudioData = { // playing: false, // playTime: 0, // formatedPlayTime: '00:00:00' // } App.mpType = 'app' const app = new Vue({ store, ...App }) app.$mount()