2023-10-30-语言适配 en
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="header_user_icon"></div>
|
||||
<!-- <div class="header_icon icon iconfont icon-touxiang3"></div> -->
|
||||
<div class="header_user_content">
|
||||
<div class="username"><span>/</span> hello@{{ userInfo?.userName }}</div>
|
||||
<div class="username"><span>/</span> {{$t('Header.hello')}}@{{ userInfo?.userName }}</div>
|
||||
<div
|
||||
:class="[
|
||||
'icon',
|
||||
@@ -27,7 +27,7 @@
|
||||
]"
|
||||
@click="turnToPage('home')"
|
||||
>
|
||||
HOME
|
||||
{{$t('Header.HOME')}}
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
@@ -36,7 +36,7 @@
|
||||
]"
|
||||
@click="turnToPage('library')"
|
||||
>
|
||||
LIBRARY
|
||||
{{$t('Header.LIBRARY')}}
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
@@ -45,7 +45,8 @@
|
||||
]"
|
||||
@click="turnToPage('history')"
|
||||
>
|
||||
HISTORY
|
||||
{{$t('Header.HISTORY')}}
|
||||
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -60,12 +61,12 @@
|
||||
</div>
|
||||
</header>
|
||||
<nav class="select_block" v-show="isShowOperate">
|
||||
<!-- <div class="select_item" @click="showBindEmailModal()">
|
||||
<span class="icon iconfont icon-youxiang"></span><span class="select_item_des">bind email</span>
|
||||
</div> -->
|
||||
<div class="select_item" @click="showBindEmailModal()">
|
||||
<span class="icon iconfont icon-youxiang"></span><span class="select_item_des">{{$t('Header.bindEmail')}}</span>
|
||||
</div>
|
||||
<div class="select_item" @click="logout()">
|
||||
<span class="icon iconfont icon-tuichu"></span
|
||||
><span class="select_item_des">log off</span>
|
||||
><span class="select_item_des">{{$t('Header.logOff')}}</span>
|
||||
</div>
|
||||
</nav>
|
||||
<a-modal
|
||||
@@ -78,17 +79,17 @@
|
||||
:centered="true"
|
||||
>
|
||||
<template #closeIcon v-if="!isHaveBindEmail && bindEmailStep === 1">
|
||||
<div class="skip_content">skip</div>
|
||||
<div class="skip_content">{{$t('Header.skip')}}</div>
|
||||
</template>
|
||||
<div class="bind_email_content" v-if="isHaveBindEmail">
|
||||
<div class="bind_email_tip">you have binded email</div>
|
||||
<div class="bind_email_tip">{{$t('Header.emailContent')}}</div>
|
||||
<div class="bind_email">{{ userInfo.email }}</div>
|
||||
</div>
|
||||
<div class="bind_email_content" v-else>
|
||||
<!-- 绑定邮箱第一步 start -->
|
||||
<div v-show="bindEmailStep === 1">
|
||||
<div class="bind_email_form_content">
|
||||
<div class="bind_email_form_title">Email</div>
|
||||
<div class="bind_email_form_title">{{$t('Header.Email')}}</div>
|
||||
<input
|
||||
class="bind_email_form_input"
|
||||
placeholder="Enter a new email"
|
||||
@@ -100,7 +101,7 @@
|
||||
class="bind_email_submit_button"
|
||||
@click="emailNextStepFun()"
|
||||
>
|
||||
Next step
|
||||
{{$t('Header.NextStep')}}
|
||||
</div>
|
||||
</div>
|
||||
<!-- 绑定邮箱第一步 end -->
|
||||
@@ -110,17 +111,17 @@
|
||||
<div @click="emailLastStepFun()">
|
||||
<span class="icon iconfont icon--shangyibu"></span
|
||||
><span class="email_last_step_content"
|
||||
>Enter verification code</span
|
||||
>{{$t('Header.verification')}}</span
|
||||
>
|
||||
</div>
|
||||
<div class="email_last_step_des">
|
||||
<div class="sent_email_content">
|
||||
Sent to {{ email }}
|
||||
{{$t('Header.SentTo')}} {{ email }}
|
||||
</div>
|
||||
<div class="tip_content">
|
||||
<span v-show="time">{{ time }}s</span>
|
||||
<span v-show="!time" @click="emailNextStepFun()"
|
||||
>Resend</span
|
||||
>{{$t('Header.Resend')}}Resend</span
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -143,11 +144,18 @@ import Habit from "@/component/Detail/habit.vue";
|
||||
import { Https } from "@/tool/https";
|
||||
import { Modal, message } from "ant-design-vue";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
VerificationCodeInput,
|
||||
Habit,
|
||||
},
|
||||
setup(){
|
||||
const {t} = useI18n()
|
||||
return {
|
||||
t
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isShowOperate: false,
|
||||
@@ -210,7 +218,7 @@ export default defineComponent({
|
||||
|
||||
emailNextStepFun() {
|
||||
if (!isEmail(this.email)) {
|
||||
message.warning("The email format is incorrect");
|
||||
message.warning(this.t('Header.jsContent1'));
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
@@ -225,7 +233,7 @@ export default defineComponent({
|
||||
(this.emailCode = ["", "", "", "", "", ""]),
|
||||
this.createTimer();
|
||||
hide();
|
||||
message.success("Succeeded in binding the mailbox.");
|
||||
message.success(this.t('Header.jsContent2'));
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
@@ -312,7 +320,7 @@ export default defineComponent({
|
||||
this.timer = setTimeout(() => {
|
||||
this.modalWarning = Modal.warning({
|
||||
title: () =>
|
||||
`You have not performed any operation for a long time. You must be active;otherwise, you will log out in ${_this.numTime} S`,
|
||||
this.t('Header.jsContent3',{numTime:_this.numTime}),
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: "Ok",
|
||||
onOk() {
|
||||
|
||||
Reference in New Issue
Block a user