切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
Karson
5 years ago
提交
8066902212e074a9d0594dd905ae905507fc2837
1 个父辈
9066b396
修复注册手机验证码验证失败的BUG
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
2 行增加
和
3 行删除
application/index/controller/User.php
application/index/view/user/register.html
application/index/controller/User.php
查看文件 @
8066902
...
...
@@ -86,7 +86,6 @@ class User extends Frontend
$email
=
$this
->
request
->
post
(
'email'
);
$mobile
=
$this
->
request
->
post
(
'mobile'
,
''
);
$captcha
=
$this
->
request
->
post
(
'captcha'
);
$code
=
$this
->
request
->
post
(
'code'
);
$token
=
$this
->
request
->
post
(
'__token__'
);
$rule
=
[
'username'
=>
'require|length:3,30'
,
...
...
@@ -114,7 +113,7 @@ class User extends Frontend
//'captcha' => $captcha,
'__token__'
=>
$token
,
];
$ret
=
Sms
::
check
(
$mobile
,
$c
ode
,
'register'
);
$ret
=
Sms
::
check
(
$mobile
,
$c
aptcha
,
'register'
);
if
(
!
$ret
)
{
$this
->
error
(
__
(
'Captcha is incorrect'
));
}
...
...
application/index/view/user/register.html
查看文件 @
8066902
...
...
@@ -38,7 +38,7 @@
<label
class=
"control-label"
>
{:__('Captcha')}
</label>
<div
class=
"controls"
>
<div
class=
"input-group"
>
<input
type=
"text"
name=
"c
ode
"
class=
"form-control input-lg"
data-rule=
"required;length(4);integer[+];remote({:url('api/validate/check_sms_correct')}, event=register, mobile:#mobile)"
/>
<input
type=
"text"
name=
"c
aptcha
"
class=
"form-control input-lg"
data-rule=
"required;length(4);integer[+];remote({:url('api/validate/check_sms_correct')}, event=register, mobile:#mobile)"
/>
<span
class=
"input-group-btn"
style=
"padding:0;border:none;"
>
<a
href=
"javascript:;"
class=
"btn btn-info btn-captcha btn-lg"
data-url=
"{:url('api/sms/send')}"
data-type=
"mobile"
data-event=
"register"
>
发送验证码
</a>
</span>
...
...
请
注册
或
登录
后发表评论