Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-blk
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
1
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
shijian
8 years ago
Commit
0c84a02518ae5148e0562bdea724eef71fd33fd4
1 parent
a4db97b6
验证码后短信无线发的问题
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
2 deletions
apps/passport/controllers/captcha.js
apps/passport/controllers/reg.js
public/js/passport/reg/reg.js
apps/passport/controllers/captcha.js
View file @
0c84a02
...
...
@@ -59,6 +59,7 @@ const generate = (req, res) => {
req
.
session
.
captcha
=
captcha
.
text
;
req
.
session
.
captchaCount
=
0
;
req
.
session
.
hasGetSMS
=
false
;
res
.
writeHead
(
200
,
{
'Content-Type'
:
'image/png'
...
...
apps/passport/controllers/reg.js
View file @
0c84a02
...
...
@@ -154,9 +154,9 @@ let sendBindMsg = (req, res, next) => {
let
area
=
req
.
body
.
area
;
// 检查是否检查过
let
checkNum
=
yield
cache
.
get
(
`
regCheckMobileNum_$
{
mobile
}
`
);
//
let checkNum = yield cache.get(`regCheckMobileNum_${mobile}`);
if
(
!
checkNum
)
{
if
(
req
.
session
.
hasGetSMS
)
{
data
.
message
=
'发送失败'
;
return
res
.
json
(
data
);
}
...
...
@@ -176,6 +176,7 @@ let sendBindMsg = (req, res, next) => {
return
cache
.
set
(
sendCodeKey
,
sendCodeTimes
+
1
,
3600
).
then
(()
=>
{
if
(
result
.
code
)
{
req
.
session
.
hasGetSMS
=
true
;
return
res
.
json
(
result
);
}
else
{
data
.
message
=
'发送失败'
;
...
...
public/js/passport/reg/reg.js
View file @
0c84a02
...
...
@@ -580,6 +580,9 @@ exports.init = function() {
sendSMSCaptcha
().
then
((
data
)
=>
{
if
(
data
.
code
!==
200
)
{
errTip
(
$smsCaptchaInput
,
data
.
message
);
refreshImgCaptcha
();
}
else
{
hideTip
(
$smsCaptchaInput
);
}
});
});
...
...
Please
register
or
login
to post a comment