|
|
@@ -39,7 +39,7 @@ const props = defineProps({
|
|
|
})
|
|
|
|
|
|
const { Code } = Config
|
|
|
-const { locale } = useI18n()
|
|
|
+const { t, locale } = useI18n()
|
|
|
|
|
|
type SystemItem = {
|
|
|
sysCode: string
|
|
|
@@ -61,10 +61,10 @@ const systemMenuList = computed(() =>{
|
|
|
|
|
|
const currentSystemName = computed(() => {
|
|
|
if (!currentSystemCode.value || systemList.value.length === 0) {
|
|
|
- return '系统切换'
|
|
|
+ return t('vu.system.title1')
|
|
|
}
|
|
|
const currentSystem = systemList.value.find((item) => item.sysCode === currentSystemCode.value)
|
|
|
- if (!currentSystem) return '系统切换'
|
|
|
+ if (!currentSystem) return t('vu.system.title1')
|
|
|
|
|
|
return getSystemDisplayName(currentSystem)
|
|
|
})
|
|
|
@@ -120,10 +120,10 @@ async function getSystemList(type = false) {
|
|
|
applySystemList(data)
|
|
|
setCache(data)
|
|
|
} else {
|
|
|
- uni.showToast({ title: (res && (res.msg || res.message)) || '获取系统列表失败', icon: 'none' })
|
|
|
+ uni.showToast({ title: (res && res.msg ) || t('vu.system.tip1'), icon: 'none' })
|
|
|
}
|
|
|
} catch (e) {
|
|
|
- uni.showToast({ title: '获取系统列表失败', icon: 'none' })
|
|
|
+ uni.showToast({ title: t('vu.system.tip1'), icon: 'none' })
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -137,10 +137,10 @@ async function switchSystem(item: SystemItem) {
|
|
|
if (!item || !item.sysCode) return
|
|
|
if (item.sysCode === currentSystemCode.value) return
|
|
|
const result = await confirm({
|
|
|
- title: '系统提示',
|
|
|
- content: '是否切换系统?',
|
|
|
- confirmText: '确认',
|
|
|
- cancelText: '取消',
|
|
|
+ title: t('Msg.SystemPrompt'),
|
|
|
+ content: t('vu.system.content'),
|
|
|
+ confirmText: t('Btn.Confirm'),
|
|
|
+ cancelText: t('Btn.Cancel'),
|
|
|
})
|
|
|
if (result){
|
|
|
await confirmSwitchSystem(item)
|