38 lines
942 B
JavaScript
38 lines
942 B
JavaScript
import App from './App'
|
||
import globalMethods from '@/utils/globalMethods.js';
|
||
import pageData from "@/static/json/page.json"
|
||
// #ifndef VUE3
|
||
import Vue from 'vue'
|
||
import './uni.promisify.adaptor'
|
||
Vue.config.productionTip = false
|
||
App.mpType = 'app'
|
||
const app = new Vue({
|
||
...App
|
||
})
|
||
app.$mount()
|
||
// #endif
|
||
|
||
// #ifdef VUE3
|
||
import {
|
||
createSSRApp
|
||
} from 'vue'
|
||
import {
|
||
store,
|
||
useStore
|
||
} from './store'
|
||
export function createApp() {
|
||
const app = createSSRApp(App)
|
||
// 从缓存读取系统信息(已在App.vue中获取)
|
||
app.config.globalProperties.$pageData = pageData
|
||
const systemInfo = uni.getStorageSync('systemInfo') || {}
|
||
app.config.globalProperties.$system = systemInfo.platform == 'ios' ? 'iOS' : 'Android'
|
||
app.config.globalProperties.$systemInfo = systemInfo
|
||
uni.setStorageSync('version', '1.0.2.sp9')
|
||
app.config.globalProperties.$version = uni.getStorageSync('version')
|
||
|
||
app.use(globalMethods);
|
||
return {
|
||
app
|
||
}
|
||
}
|
||
// #endif
|