fix: 移动端登录账号长度限制错误

This commit is contained in:
fit2cloud-chenyw 2022-04-02 11:54:42 +08:00
parent dfff087d54
commit 44c0efa859
4 changed files with 10 additions and 7 deletions

View File

@ -30,7 +30,8 @@
"passwordPlaceholder": "Please Input Password:", "passwordPlaceholder": "Please Input Password:",
"loginbtn": "Login", "loginbtn": "Login",
"pwdFmtError": "Password Must More Than 6 Characters", "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": { "home": {
"tab1": "My Favorites", "tab1": "My Favorites",

View File

@ -29,7 +29,8 @@
"password": "密码:", "password": "密码:",
"passwordPlaceholder": "请输入密码", "passwordPlaceholder": "请输入密码",
"loginbtn": "登录", "loginbtn": "登录",
"pwdFmtError": "密码最短为6个字符", "pwdFmtError": "密码最短为1个字符",
"accFmtError": "账号最短为1个字符",
"uOrpwdError": "无效账号或密码" "uOrpwdError": "无效账号或密码"
}, },
"home": { "home": {

View File

@ -31,7 +31,8 @@
"passwordPlaceholder": "請輸入密碼", "passwordPlaceholder": "請輸入密碼",
"loginbtn": "登錄", "loginbtn": "登錄",
"pwdFmtError": "密碼最短為6個字符", "pwdFmtError": "密碼最短為6個字符",
"uOrpwdError": "無效賬號或密碼" "uOrpwdError": "無效賬號或密碼",
"accFmtError": "帳號最短為1個字符"
}, },
"home": { "home": {
"tab1": "我的收藏", "tab1": "我的收藏",

View File

@ -67,17 +67,17 @@
async loginByPwd() { async loginByPwd() {
if (this.username.length < 3) { if (this.username.length < 1) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: '账号最短为 3 个字符' title: this.$t('login.accFmtError')
}); });
return; return;
} }
if (this.password.length < 6) { if (this.password.length < 1) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
title: this.$t('login.pwdFmtError') title: this.$t('login.passwordPlaceholder')
}); });
return; return;
} }