From c990a850cbd7c9c61ee1d720913d13abc7e85e26 Mon Sep 17 00:00:00 2001 From: chenshihai Date: Mon, 20 Jun 2022 16:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=8B=E6=9C=BA=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=20Signed-off-by:=20chenshihai=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/user/auth/phone_verify.tmpl | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/templates/user/auth/phone_verify.tmpl b/templates/user/auth/phone_verify.tmpl index 8f8e2ea87..1942835df 100644 --- a/templates/user/auth/phone_verify.tmpl +++ b/templates/user/auth/phone_verify.tmpl @@ -195,7 +195,7 @@
- +
@@ -210,7 +210,7 @@
- +
获取验证码
@@ -295,7 +295,7 @@ x: parseInt(self.dom.find('.slide-image-small').position().left) }, success: function(res) { - if (res && res.code === 0) { + if (res && res.Code === 0) { self.verifySucess = true; self.canSendCode = true; self.dom.find('.slide-bar').addClass('sucess'); @@ -338,9 +338,28 @@ var phoneNumber = self.dom.find('.phone-num-c input').val(); if (!/^1[3578]\d{9}$/.test(phoneNumber)) { self.dom.find('.phone-num-c').addClass('error'); + return; } else { self.dom.find('.phone-num-c').removeClass('error'); self.countDown(); + $.ajax({ + url: '/sendVerifyCode', + type: 'post', + dataType: 'json', + data: { + phone_number: phoneNumber, + mode: 0, // 0注册,1登录 ,2修改手机号,3找回密码 + slide_id: self.imgID, + }, + success: function(res) { + if (res && res.code === 0) { + console.log(res); + } + }, + error: function(err) { + console.log(err); + } + }); } }); };