From 8edb35e4fed1f0be55ea0af2cd0a12a5e23b1117 Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Thu, 23 Feb 2023 10:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallplusui-uniapp-app/pages/public/login.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mallplusui-uniapp-app/pages/public/login.vue b/mallplusui-uniapp-app/pages/public/login.vue index d75dc45..58947fc 100644 --- a/mallplusui-uniapp-app/pages/public/login.vue +++ b/mallplusui-uniapp-app/pages/public/login.vue @@ -497,9 +497,7 @@ if (!phoneReg.test(this.phone)) { throw '手机号格式有误'; } - if (this.password == '') { - throw '请填写密码'; - } + } catch (err) { this.$api.msg(err); return; @@ -531,7 +529,14 @@ } } else { // 账号登录 - + try { + if (this.password == '') { + throw '请填写密码'; + } + } catch (err) { + this.$api.msg(err); + return; + } let params = { phone: this.phone, password: this.password