import Vue from 'vue' import App from './App' import uView from "uview-ui"; import VueI18n from 'vue-i18n' import axios from './utils/axios.js' import store from './store' import index from './utils/index.js' // 多国语言 import EN from './utils/language/en_US.js' import ZH from './utils/language/zh_TW.js' import VI from './utils/language/vi_VN.js' import api from './utils/api.js' import constant from './utils/constant.js' import websocket from './utils/websocket.js' // import math from './utils/math.js' Vue.prototype.$api = api Vue.prototype.$constant = constant Vue.prototype.$websocket = websocket // Vue.prototype.$math = math // 自定义底部导航栏 import tabBar from 'components/tabBar/tabBar.vue' Vue.component('tab-bar', tabBar) Vue.use(uView); uni.$u.config.unit = 'rpx' Vue.use(VueI18n); // #ifdef H5 window.wx = {} // #endif const i18n = new VueI18n({ locale: store.state.language, // 默认选择的语言 // locale: 'en_US', // 默认选择的语言 messages: { 'en_US': EN, 'zh_TW': ZH, 'vi_VN': VI, } }) Vue.prototype.$store = store Vue.prototype.$axios = axios Vue.prototype.$index = index Vue.prototype.$_i18n = i18n // #ifndef VUE3 Vue.config.productionTip = false App.mpType = 'app' const app = new Vue({ i18n, store, ...App }) app.$mount() // #endif // #ifdef VUE3 import { createSSRApp } from 'vue' export function createApp() { const app = createSSRApp(App) return { app } } // #endif