ReedawFoodApp/main.js

63 lines
1.1 KiB
JavaScript
Raw Normal View History

2025-05-30 10:04:01 +08:00
import App from './App'
2025-05-30 11:14:38 +08:00
// vuex
import store from './store'
Vue.prototype.$store = store;
// 公共js
import tools from '@/toolJs/tools.js'
Vue.prototype.$tools = tools;
//请求
import http from '@/toolJs/https.js'
Vue.prototype.$http = http;
//接口
import model from '@/toolJs/model.js'
Vue.prototype.$model = model;
2026-03-23 09:50:49 +08:00
// 蓝牙js
import useBluetooth from "@/toolJs/Bluetooth.js";
Vue.prototype.$ble = useBluetooth;
2025-05-30 11:14:38 +08:00
//模拟数据
import video from '@/video.json'
Vue.prototype.$video = video;
2025-05-30 10:04:01 +08:00
2026-03-31 16:04:41 +08:00
// 语言
import messages from '@/language/index.js'
let i18nConfig = {
locale: uni.getLocale(),
messages
}
2026-03-23 09:50:49 +08:00
//模拟数据
import json from '@/content.json'
Vue.prototype.$json = json;
2025-05-30 10:04:01 +08:00
// #ifndef VUE3
import Vue from 'vue'
2026-03-31 16:04:41 +08:00
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n(i18nConfig)
2025-05-30 10:04:01 +08:00
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
2026-03-31 16:04:41 +08:00
i18n,
2025-05-30 11:14:38 +08:00
...App
2025-05-30 10:04:01 +08:00
})
app.$mount()
// #endif
// #ifdef VUE3
2025-05-30 11:14:38 +08:00
import {
createSSRApp
} from 'vue'
2026-03-31 16:04:41 +08:00
import {
createI18n
} from 'vue-i18n'
const i18n = createI18n(i18nConfig)
2025-05-30 10:04:01 +08:00
export function createApp() {
2025-05-30 11:14:38 +08:00
const app = createSSRApp(App)
2026-03-31 16:04:41 +08:00
app.use(i18n)
2025-05-30 11:14:38 +08:00
return {
app
}
2025-05-30 10:04:01 +08:00
}
// #endif