Files
device-voice-h5/main.js
sexygoat 0ada36a778
All checks were successful
构建并部署前端到生产环境 / build-and-deploy (push) Successful in 45s
fix: 扫一扫
2026-04-17 16:31:37 +08:00

49 lines
977 B
JavaScript

import App from './App'
import uviewPlus from 'uview-plus'
function loadScript(src) {
return new Promise((resolve, reject) => {
const script = document.createElement('script')
script.onload = () => resolve()
script.onerror = reject
script.src = src
document.head.appendChild(script)
})
}
loadScript('./node_modules/jweixin-module/lib/index.js')
// #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'
export function createApp() {
const app = createSSRApp(App)
// 使用 uview-plus (版本 3.4.0+)
app.use(uviewPlus, () => {
return {
options: {
config: {
// 默认单位 rpx
unit: 'rpx'
},
props: {
// 可以在这里配置组件默认属性
}
}
}
})
return {
app
}
}
// #endif