From b5f393ceb74cdc038ec6c2cf572730ff4510f1c1 Mon Sep 17 00:00:00 2001
From: X1627315083 <1627315083@qq.com>
Date: Mon, 15 Dec 2025 10:59:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=87=E6=8D=A2=E8=AF=AD?=
=?UTF-8?q?=E8=A8=80=EF=BC=8C=E7=99=BB=E5=BD=95=E9=A1=B5=E8=B0=B7=E6=AD=8C?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E5=92=8C=E5=BE=AE=E4=BF=A1=E7=99=BB=E5=BD=95?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=E6=B7=BB=E5=8A=A0=E8=AF=AD=E8=A8=80=E9=80=82?=
=?UTF-8?q?=E9=85=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/component/LoginPage/googleLogin.vue | 8 ++++++--
src/component/LoginPage/weiXinLogin.vue | 12 +++++++++---
src/lang/cn.ts | 6 ++++--
src/lang/en.ts | 4 +++-
src/views/HomeMain.vue | 1 +
5 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/src/component/LoginPage/googleLogin.vue b/src/component/LoginPage/googleLogin.vue
index 09843dc2..d44a14a6 100644
--- a/src/component/LoginPage/googleLogin.vue
+++ b/src/component/LoginPage/googleLogin.vue
@@ -6,7 +6,7 @@

-
{{ $props.text }}
+
{{ displayText }}
@@ -21,7 +21,7 @@
props: {
text: {
type: String,
- default: 'Sign in with Google'
+ default: ''
}
},
setup(props, { emit }) {
@@ -108,6 +108,9 @@
const toGmailLogin = ()=>{
message.info(t('account.canNotUtilize'))
}
+ const displayText = computed(() => {
+ return props.text || t('Login.LoginWithGoogle')
+ })
onBeforeUnmount(()=>{
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(existingScript){
@@ -120,6 +123,7 @@
})
return {
toGmailLogin,
+ displayText,
}
},
})
diff --git a/src/component/LoginPage/weiXinLogin.vue b/src/component/LoginPage/weiXinLogin.vue
index 915b22b9..f4d72bf8 100644
--- a/src/component/LoginPage/weiXinLogin.vue
+++ b/src/component/LoginPage/weiXinLogin.vue
@@ -2,7 +2,7 @@

-
{{ $props.text }}
+
{{ displayText }}
@@ -18,6 +18,7 @@ import {
toRefs,
} from "vue";
import weiXinModel from "./weiXinModel.vue";
+import { useI18n } from 'vue-i18n'
export default defineComponent({
name: "login",
components: {
@@ -26,20 +27,25 @@ export default defineComponent({
props: {
text: {
type: String,
- default: "Sign in with Wechat",
+ default: ''
},
},
- setup() {
+ setup(props) {
let weiXinDom = reactive({
weiXinModel: null,
});
+ const { t } = useI18n()
const openWeiXinModel = () => {
weiXinDom.weiXinModel.init();
};
+ const displayText = computed(() => {
+ return props.text || t('Login.LoginWithWechat')
+ })
onMounted(() => {});
return {
...toRefs(weiXinDom),
openWeiXinModel,
+ displayText,
};
},
});
diff --git a/src/lang/cn.ts b/src/lang/cn.ts
index ef6ba7be..30c4ea3a 100644
--- a/src/lang/cn.ts
+++ b/src/lang/cn.ts
@@ -1543,11 +1543,13 @@ export default {
LoginMethod: '使用以下方式登录:',
Individual: '个人账号',
Academic: '学术账号',
- LogoOnToAiDA: '登录到AiDA 3.1',
+ LogonToAiDA: '登录到AiDA 3.1',
Infomation: '请填写以下信息',
Device: '请使用iPad或电脑登录',
AgreePolicies: '请勾选条款、隐私政策和费用',
- PasswordConditions: '您必须满足所有密码条件才能注册'
+ PasswordConditions: '您必须满足所有密码条件才能注册',
+ LoginWithGoogle: '使用谷歌账号登录',
+ LoginWithWechat: '使用微信登录',
},
LoginPersonal: {
Email: '邮箱',
diff --git a/src/lang/en.ts b/src/lang/en.ts
index ad54edf4..d9c065c3 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -1591,7 +1591,9 @@ export default {
Infomation: 'Please fill your information below',
Device: 'If you need to design, please log in using an iPad or computer.',
AgreePolicies: 'Please agree to all terms, privacy policy, and fees.',
- PasswordConditions: 'You must satisfy ALL password conditions to register.'
+ PasswordConditions: 'You must satisfy ALL password conditions to register.',
+ LoginWithGoogle: 'Sign in with Google',
+ LoginWithWechat: 'Sign in with Wechat',
},
LoginPersonal: {
Email: 'Email',
diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue
index 444ff49b..7957a3a9 100644
--- a/src/views/HomeMain.vue
+++ b/src/views/HomeMain.vue
@@ -432,6 +432,7 @@
ref="home"
@setNewProject="() => (leftShow = true)"
@setTask="setTask"
+ :key="userDetail.language"
>