diff --git a/src/component/LoginPage/login/enterprise.vue b/src/component/LoginPage/login/enterprise.vue index 278a90ea..c2265558 100644 --- a/src/component/LoginPage/login/enterprise.vue +++ b/src/component/LoginPage/login/enterprise.vue @@ -9,14 +9,14 @@
- +
- +
@@ -79,15 +79,15 @@
--> - Retrieve password + {{ t('LoginEnterprise.RetrievePassword') }}
-
Email
+
{{ t('LoginEnterprise.Email') }}
@@ -167,20 +167,20 @@ class="forget_submit_button marign_top40" @click="forgetPasswordNextStepFun()" > - Next step + {{ t('LoginEnterprise.NextStep') }}
-
Verification Code
+
{{ t('LoginEnterprise.VerificationCode') }}
@@ -192,7 +192,7 @@
-
Password
+
{{ t('LoginEnterprise.Password') }}
@@ -205,7 +205,7 @@ class="fi fi-br-check" >
-
At least 8 characters long
+
{{ t('LoginEnterprise.AtLeast8Chars') }}
@@ -218,7 +218,7 @@ class="fi fi-br-check" >
-
Must contain special characters
+
{{ t('LoginEnterprise.MustContainSpecial') }}
@@ -232,13 +232,13 @@ >
- Mix of uppercase, lowercase and numbers + {{ t('LoginEnterprise.MixUpperLowerNumbers') }}
- Submit + {{ t('LoginEnterprise.Submit') }}
@@ -263,7 +263,7 @@ diff --git a/src/views/Login.vue b/src/views/Login.vue index 2efedabb..563af0eb 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -15,21 +15,21 @@
-

Welcome to AiDA

+

{{ t('Login.Welcome') }} {{ t('Login.AiDA') }}

- AiDA, a first-to-market technology that empowers fashion designers, based on their creative inspirations, to work with AI to create original designs. + {{ t('Login.Slogan') }}
-
Continue with one of these:
+
{{ t('Login.LoginMethod') }}
- Log on to AiDA 3.1 + {{ t('Login.LogonToAiDA') }}
-
Please fill your information below
+
{{ t('Login.Infomation') }}
@@ -90,9 +90,17 @@ export default defineComponent({ props: {}, emits: [], setup(props, { emit }) { + const {t,locale} = useI18n() const store = useStore(); const router = useRouter() const route = useRoute() + + // 通过 provide 传递 i18n 给子组件 + provide('i18n', { + t, + locale + }) + const loginData = reactive({ loginType: "", isMask: false, @@ -137,7 +145,7 @@ export default defineComponent({ store.commit("upUserDetail", userid); if (window.innerWidth < 768) { message.info( - "If you need to design, please log in using an iPad or computer." + t('Login.Device') ); turnToHomePage("/Square"); } else { @@ -174,6 +182,10 @@ export default defineComponent({ if (data?.state == "weiXin") { wechatLogin(data); } + const savedLang = localStorage.getItem('loginLanguage') + if (savedLang) { + locale.value = savedLang + } }) return { ...toRefs(dataDom), @@ -181,11 +193,10 @@ export default defineComponent({ setLoginType, loginBack, toBack, + t, + locale }; }, - provide() { - return {}; - }, });