generated from ccsens_fe/uni-vue3-template
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.
30 lines
683 B
30 lines
683 B
import * as Pinia from 'pinia'
|
|
import * as service from '@/config/service'
|
|
|
|
import { alertError, openPage } from '@/utils/common'
|
|
|
|
import App from './App.vue'
|
|
import { LOCAL_KEY } from '@/config/local'
|
|
import { createSSRApp } from 'vue'
|
|
import { setupApi } from '@/api'
|
|
import { setupHttp } from '@/utils/http'
|
|
import { setupStore } from '@/store'
|
|
import uView from './uni_modules/vk-uview-ui'
|
|
|
|
uni.$u.openPage = openPage
|
|
uni.$u.alertError = alertError
|
|
uni.$u.LOCAL_KEY = LOCAL_KEY
|
|
uni.$u.service = { ...service }
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
setupHttp(app)
|
|
setupApi(app)
|
|
setupStore(app)
|
|
|
|
app.use(uView)
|
|
return {
|
|
app,
|
|
Pinia,
|
|
}
|
|
}
|
|
|