2023-09-08 15:17:21 +08:00
|
|
|
import App from './App'
|
|
|
|
|
import store from './store'
|
|
|
|
|
Vue.prototype.$store = store;
|
|
|
|
|
// js
|
|
|
|
|
import tools from '@/tools/tools.js'
|
|
|
|
|
Vue.prototype.$tools = tools;
|
2025-11-26 17:32:18 +08:00
|
|
|
// 蓝牙
|
|
|
|
|
import bluetooth from '@/tools/bluetooth.js'
|
|
|
|
|
Vue.prototype.$ble = bluetooth;
|
2023-09-08 15:17:21 +08:00
|
|
|
//请求
|
|
|
|
|
import http from '@/tools/https.js'
|
|
|
|
|
Vue.prototype.$http = http;
|
|
|
|
|
//接口
|
|
|
|
|
import model from '@/tools/model.js'
|
|
|
|
|
Vue.prototype.$model = model;
|
2025-12-01 09:59:25 +08:00
|
|
|
// 语言
|
2025-12-22 09:34:09 +08:00
|
|
|
import messages from '@/language/index.js'
|
2025-12-01 09:59:25 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
let i18nConfig = {
|
|
|
|
|
locale: uni.getLocale(),
|
|
|
|
|
messages
|
|
|
|
|
}
|
2023-09-08 15:17:21 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
// #ifndef VUE3
|
|
|
|
|
import Vue from 'vue'
|
2025-12-01 09:59:25 +08:00
|
|
|
import VueI18n from 'vue-i18n'
|
|
|
|
|
Vue.use(VueI18n)
|
|
|
|
|
const i18n = new VueI18n(i18nConfig)
|
2023-09-08 15:17:21 +08:00
|
|
|
Vue.config.productionTip = false
|
|
|
|
|
App.mpType = 'app'
|
|
|
|
|
const app = new Vue({
|
2025-12-01 09:59:25 +08:00
|
|
|
i18n,
|
2023-09-08 15:17:21 +08:00
|
|
|
...App
|
|
|
|
|
})
|
|
|
|
|
app.$mount()
|
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
|
|
// #ifdef VUE3
|
|
|
|
|
import {
|
|
|
|
|
createSSRApp
|
|
|
|
|
} from 'vue'
|
2025-12-01 09:59:25 +08:00
|
|
|
import {
|
|
|
|
|
createI18n
|
|
|
|
|
} from 'vue-i18n'
|
|
|
|
|
const i18n = createI18n(i18nConfig)
|
2023-09-08 15:17:21 +08:00
|
|
|
export function createApp() {
|
|
|
|
|
const app = createSSRApp(App)
|
2025-12-01 09:59:25 +08:00
|
|
|
app.use(i18n)
|
2023-09-08 15:17:21 +08:00
|
|
|
return {
|
|
|
|
|
app
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-01 09:59:25 +08:00
|
|
|
// #endif
|