2025-11-05 15:59:48 +08:00
|
|
|
// #ifdef VUE3
|
2025-12-30 08:40:09 +08:00
|
|
|
import { createSSRApp } from 'vue'
|
|
|
|
|
import App from './App'
|
|
|
|
|
import uView from './uni_modules/vk-uview-ui'
|
2025-11-05 15:59:48 +08:00
|
|
|
import donghua from '@/component/public/donghua.vue'
|
2025-12-08 09:28:13 +08:00
|
|
|
import errorshow from '@/component/public/errorshow.vue'
|
2025-12-30 08:40:09 +08:00
|
|
|
import tanchuang from '@/pages/procurement/components/tanchuang.vue'
|
|
|
|
|
// import WsRequest from '@/common/websocket.js' // default 导入,文件必须有 export default
|
|
|
|
|
|
2025-11-05 15:59:48 +08:00
|
|
|
export function createApp() {
|
2025-12-30 08:40:09 +08:00
|
|
|
const app = createSSRApp(App)
|
|
|
|
|
|
|
|
|
|
// // 延后创建实例(构造不会阻塞主线程)
|
|
|
|
|
// const websocket = new WsRequest(
|
|
|
|
|
// 'wss://www.focusnu.com/ws101/sdWebsocket/1942419556028956674',
|
|
|
|
|
// {
|
|
|
|
|
// debug: true,
|
|
|
|
|
// heartbeatInterval: 25000
|
|
|
|
|
// }
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
|
|
// app.config.globalProperties.$socket = websocket
|
|
|
|
|
// app.provide('socket', websocket)
|
2025-11-05 15:59:48 +08:00
|
|
|
|
2025-12-30 08:40:09 +08:00
|
|
|
app.use(uView)
|
|
|
|
|
app.component('donghua', donghua)
|
|
|
|
|
app.component('tanchuang', tanchuang)
|
|
|
|
|
app.component('errorshow', errorshow)
|
|
|
|
|
|
|
|
|
|
return { app }
|
2025-11-05 15:59:48 +08:00
|
|
|
}
|
2025-12-30 08:40:09 +08:00
|
|
|
// #endif
|