Files
smart_storage_app/App.vue
2025-06-30 10:21:25 +08:00

40 lines
1.0 KiB
Vue

<script>
import VueI18n from '@/common/vue-i18n.min.js'
import Vue from 'vue'
export default {
async onShow() {
const res = await this.$u.api.GetLanguageConfig('zh')
const res2 = await this.$u.api.GetLanguageConfig('en')
const result = JSON.parse(res.data[0].content)
const result2 = JSON.parse(res2.data[0].content)
this.$i18n.mergeLocaleMessage('en_US',result2) //添加英文
this.$i18n.mergeLocaleMessage('zh_CN',result) //添加中文
},
onLaunch() {
// 国际化,设置当前语言
// if (this.vuex_locale) {
// this.$i18n.locale = this.vuex_locale;
// this.$u.api.lang({ lang: this.vuex_locale });
// }
// 设置底部导航栏角标
// uni.setTabBarBadge({
// index: 0,
// text: '3'
// });
// uni.removeTabBarBadge({
// index: 0
// });
},
globalData: {
update: {
wordOrder:false // 工单页面是否刷新
},
},
};
</script>
<style lang="scss">
@import "uview-ui/index.scss";
page{
background: #f8f8f8;
}
</style>