You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
596 B
26 lines
596 B
import { createSSRApp } from 'vue'
|
|
import uviewPlus from 'uview-plus'
|
|
import App from './App.vue'
|
|
import { setupStore } from './stores'
|
|
import { useUserStore } from './stores/user'
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
const pinia = setupStore()
|
|
app.use(pinia)
|
|
app.use(uviewPlus)
|
|
app.mixin({
|
|
onShow() {
|
|
// #ifdef MP-WEIXIN
|
|
uni.showShareMenu({
|
|
menus: ['shareAppMessage', 'shareTimeline'],
|
|
})
|
|
// #endif
|
|
},
|
|
})
|
|
const userStore = useUserStore(pinia)
|
|
userStore.bootstrap()
|
|
return {
|
|
app,
|
|
}
|
|
}
|