| | |
| | | |
| | | import App from './App' |
| | | |
| | | // vuex |
| | |
| | | |
| | | // 引入全局uview-plus |
| | | import uviewPlus, { setConfig } from '@/uni_modules/uview-plus' |
| | | //上传方法 |
| | | import * as Upload from '@/common/utils/uploadHelper.js' |
| | | //常用方法库 |
| | | import * as Common from '@/common/utils/commonHelper.js' |
| | | //本地存储封装 |
| | | import * as Db from '@/common/utils/dbHelper.js' |
| | | //全局常量配置 |
| | | import * as GlobalConstVars from '@/common/setting/constVarsHelper.js' |
| | | import * as Http from '@/common/request/http.api.js' |
| | | |
| | | // i18n部分的配置 |
| | | // 引入语言包,注意路径 |
| | |
| | | 'zh-Hans': zhHans, |
| | | } |
| | | let i18nConfig = { |
| | | locale: uni.getLocale(),// 获取已设置的语言 |
| | | messages |
| | | locale: uni.getLocale(),// 获取已设置的语言 |
| | | messages |
| | | } |
| | | |
| | | // 引入uView对小程序分享的mixin封装 |
| | | import mpShare from '@/uni_modules/uview-plus/libs/mixin/mpShare.js' |
| | | import mixin from './common/mixin' |
| | | |
| | | |
| | | // #ifdef VUE3 |
| | | import { createSSRApp } from 'vue' |
| | | import { createI18n } from 'vue-i18n' |
| | |
| | | } |
| | | }) |
| | | export function createApp() { |
| | | const app = createSSRApp(App) |
| | | |
| | | // 引入请求封装 |
| | | initRequest(app) |
| | | const app = createSSRApp(App) |
| | | |
| | | app.use(store) |
| | | .use(i18n) |
| | | .use(uviewPlus) |
| | | // 引入请求封装 |
| | | initRequest(app) |
| | | |
| | | // #ifdef MP |
| | | app.mixin(mpShare) |
| | | app.mixin(mixin) |
| | | // #endif |
| | | app.use(store) |
| | | .use(i18n) |
| | | .use(uviewPlus) |
| | | app.config.globalProperties.$upload = Upload; |
| | | app.config.globalProperties.$common = Common; |
| | | app.config.globalProperties.$db = Db; |
| | | app.config.globalProperties.$globalConstVars = GlobalConstVars; |
| | | app.config.globalProperties.$api = Http; |
| | | // #ifdef MP |
| | | app.mixin(mpShare) |
| | | app.mixin(mixin) |
| | | // #endif |
| | | |
| | | return { |
| | | app |
| | | } |
| | | return { |
| | | app |
| | | } |
| | | } |
| | | // #endif |
| | | |
| | | |
| | | |
| | | |
| | | // #endif |