123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- import App from "./App";
- // #ifndef VUE3
- import Vue from "vue";
- import "./uni.promisify.adaptor";
- import uView from "@/uview-ui";
- import VueI18n from "vue-i18n";
- import messages from "./commont/messages.js";
- // import uView from '/uview-ui/uview-ui'
- Vue.use(VueI18n);
- Vue.config.productionTip = false;
- // 多国语言包配置
- const i18n = new VueI18n({
- locale: uni.getStorageSync("language"),
- // locale: "en-US",
- messages,
- });
- Vue.prototype._language = uni.getStorageSync("language");
- Vue.prototype._i18n = i18n;
- Vue.use(uView);
- App.mpType = "app";
- const app = new Vue({
- i18n,
- ...App,
- });
- // import WebIM from "./utils/WebIM.js"
- // Vue.use(WebIM,app)
- // 引入请求封装,将app参数传递到配置中
- // require('./commont/http.interceptor.js')(app)
- import httpInterceptor from "@/commont/http.interceptor.js";
- // 这里需要写在最后,是为了等Vue创建对象完成,引入"app"对象(也即页面的"this"实例)
- Vue.use(httpInterceptor, app);
- app.$mount();
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from "vue";
- export function createApp() {
- const app = createSSRApp(App);
- return {
- app,
- };
- }
- // #endif
|