2025-06-30 10:21:25 +08:00
|
|
|
<script>
|
|
|
|
|
import VueI18n from '@/common/vue-i18n.min.js'
|
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
export default {
|
|
|
|
|
async onShow() {
|
2026-01-30 09:35:52 +08:00
|
|
|
const res = await this.$u.api.GetLanguageConfig('zh')
|
|
|
|
|
const res2 = await this.$u.api.GetLanguageConfig('en')
|
|
|
|
|
const res3 = await this.$u.api.GetLanguageConfig('fr')
|
|
|
|
|
const res4 = await this.$u.api.GetLanguageConfig('es')
|
|
|
|
|
const res5 = await this.$u.api.GetLanguageConfig('ar')
|
|
|
|
|
const res6 = await this.$u.api.GetLanguageConfig('de')
|
|
|
|
|
const res7 = await this.$u.api.GetLanguageConfig('pl')
|
|
|
|
|
const result = JSON.parse(res.data[0].content)
|
|
|
|
|
const result2 = JSON.parse(res2.data[0].content)
|
|
|
|
|
const result3 = JSON.parse(res3.data[0].content)
|
|
|
|
|
const result4 = JSON.parse(res4.data[0].content)
|
|
|
|
|
const result5 = JSON.parse(res5.data[0].content)
|
|
|
|
|
const result6 = JSON.parse(res6.data[0].content)
|
|
|
|
|
const result7 = JSON.parse(res7.data[0].content)
|
|
|
|
|
this.$i18n.mergeLocaleMessage('en_US', result2) //添加英文
|
|
|
|
|
this.$i18n.mergeLocaleMessage('zh_CN', result) //添加中文
|
|
|
|
|
this.$i18n.mergeLocaleMessage('fr_FR', result3) //添加法语
|
|
|
|
|
this.$i18n.mergeLocaleMessage('es_ES', result4) //添加西班牙语
|
|
|
|
|
this.$i18n.mergeLocaleMessage('ar_EG', result5) //添加阿拉伯语
|
|
|
|
|
this.$i18n.mergeLocaleMessage('de_DE', result6) //添加德语
|
|
|
|
|
this.$i18n.mergeLocaleMessage('pl_PL', result7) //添加波兰语
|
2025-06-30 10:21:25 +08:00
|
|
|
},
|
|
|
|
|
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">
|
2025-10-29 17:31:26 +08:00
|
|
|
@import "@/static/scss/init.scss";
|
2025-06-30 10:21:25 +08:00
|
|
|
@import "uview-ui/index.scss";
|
|
|
|
|
page{
|
|
|
|
|
background: #f8f8f8;
|
|
|
|
|
}
|
|
|
|
|
</style>
|