update 基本完成国际化

This commit is contained in:
2022-09-02 14:09:41 +08:00
parent 12556886b9
commit 076eaa5f2a
15 changed files with 503 additions and 85 deletions

View File

@@ -42,12 +42,13 @@
</el-form>
</div>
<div class="login-footer">
<p>
<a href="http://demo.open.renren.io/renren-security" target="_blank">{{ $t('login.demo') }}</a>
<p style="background: #ececec99; border-radius: 8px;">
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('zh')">中文</el-button> |
<el-button style="background: none; color: #fff; border: unset; outline: unset; cursor: pointer;" @click="chLang('en')">English</el-button>
</p>
<p>
<a href="https://www.renren.io/" target="_blank">{{ $t('login.copyright') }}</a>
2022 © renren.io
{{ $t('login.copyright') }}
</p>
</div>
</main>
@@ -86,6 +87,18 @@ export default {
// this.getCaptcha()
},
methods: {
chLang(lang) {
switch (lang) {
case 'zh':
this.$root.$i18n.locale = 'zh-CN'
// location.reload()
break
case 'en':
this.$root.$i18n.locale = 'en'
location.reload()
break
}
},
// 获取验证码
getCaptcha() {
this.dataForm.uuid = getUUID()