From 9cf2c2a0be7a268660aa1118b84ab01364d2bfff Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Sat, 2 Apr 2022 11:54:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E8=B4=A6=E5=8F=B7=E9=95=BF=E5=BA=A6=E9=99=90=E5=88=B6?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/src/locale/en.json | 3 ++- mobile/src/locale/zh-Hans.json | 3 ++- mobile/src/locale/zh-Hant.json | 3 ++- mobile/src/pages/login/index.vue | 8 ++++---- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mobile/src/locale/en.json b/mobile/src/locale/en.json index 12505a46d6..a7b72f12c3 100644 --- a/mobile/src/locale/en.json +++ b/mobile/src/locale/en.json @@ -30,7 +30,8 @@ "passwordPlaceholder": "Please Input Password:", "loginbtn": "Login", "pwdFmtError": "Password Must More Than 6 Characters", - "uOrpwdError": "Invalid Account Or Password" + "uOrpwdError": "Invalid Account Or Password", + "accFmtError": "Account Must More Than 1 Characters" }, "home": { "tab1": "My Favorites", diff --git a/mobile/src/locale/zh-Hans.json b/mobile/src/locale/zh-Hans.json index 780d06d6d6..afaed12e0f 100644 --- a/mobile/src/locale/zh-Hans.json +++ b/mobile/src/locale/zh-Hans.json @@ -29,7 +29,8 @@ "password": "密码:", "passwordPlaceholder": "请输入密码", "loginbtn": "登录", - "pwdFmtError": "密码最短为6个字符", + "pwdFmtError": "密码最短为1个字符", + "accFmtError": "账号最短为1个字符", "uOrpwdError": "无效账号或密码" }, "home": { diff --git a/mobile/src/locale/zh-Hant.json b/mobile/src/locale/zh-Hant.json index e2ca5b6406..a3b8f5f97c 100644 --- a/mobile/src/locale/zh-Hant.json +++ b/mobile/src/locale/zh-Hant.json @@ -31,7 +31,8 @@ "passwordPlaceholder": "請輸入密碼", "loginbtn": "登錄", "pwdFmtError": "密碼最短為6個字符", - "uOrpwdError": "無效賬號或密碼" + "uOrpwdError": "無效賬號或密碼", + "accFmtError": "帳號最短為1個字符" }, "home": { "tab1": "我的收藏", diff --git a/mobile/src/pages/login/index.vue b/mobile/src/pages/login/index.vue index b3a741575b..5b10f91ac3 100644 --- a/mobile/src/pages/login/index.vue +++ b/mobile/src/pages/login/index.vue @@ -67,17 +67,17 @@ async loginByPwd() { - if (this.username.length < 3) { + if (this.username.length < 1) { uni.showToast({ icon: 'none', - title: '账号最短为 3 个字符' + title: this.$t('login.accFmtError') }); return; } - if (this.password.length < 6) { + if (this.password.length < 1) { uni.showToast({ icon: 'none', - title: this.$t('login.pwdFmtError') + title: this.$t('login.passwordPlaceholder') }); return; }