rev: admin 修复国际化

This commit is contained in:
2024-05-31 08:52:10 +08:00
parent 7659065a68
commit adafb2cec5
12 changed files with 130 additions and 60 deletions

View File

@@ -62,12 +62,13 @@ import Config from '@/settings'
import { getCodeImg } from '@/api/login'
import Cookies from 'js-cookie'
import Background from '@/assets/images/background.jpg'
import i18n from '@/i18n'
export default {
name: 'Login',
data() {
return {
language: '简体中文',
title: '诺力开发平台',
title: i18n.t('platform.title'),
title_param: 'platform',
Background: Background,
codeUrl: '',
@@ -80,9 +81,9 @@ export default {
uuid: ''
},
loginRules: {
username: [{ required: true, trigger: 'blur', message: '用户名不能为空' }],
password: [{ required: true, trigger: 'blur', message: '密码不能为空' }],
code: [{ required: true, trigger: 'change', message: '验证码不能为空' }]
username: [{ required: true, trigger: 'blur', message: i18n.t('platform.tip1') }],
password: [{ required: true, trigger: 'blur', message: i18n.t('platform.tip2') }],
code: [{ required: true, trigger: 'change', message: i18n.t('platform.tip3') }]
},
loading: false,
redirect: undefined
@@ -185,8 +186,8 @@ export default {
console.log(point)
if (point) {
this.$notify({
title: '提示',
message: '当前登录状态已过期,请重新登录!',
title: i18n.t('common.Tips'),
message: i18n.t('common.Tip20'),
type: 'warning',
duration: 5000
})