Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
557e0a9b
Commit
557e0a9b
authored
Jan 03, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信验证码以最后一个为准
parent
e61e1bd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
Member.php
application/api/controller/Member.php
+14
-12
No files found.
application/api/controller/Member.php
View file @
557e0a9b
...
...
@@ -203,13 +203,14 @@ class Member extends Basic
$jwt_phone
=
$jwt_data
[
'data'
][
'phone'
];
$note
=
new
NoteLog
();
$note_data
=
$note
->
field
(
'id,code,send_time'
)
->
where
([
'phone'
=>
$phone
,
'code'
=>
$code
,
'is_success'
=>
1
,
])
->
whereTime
(
'send_time'
,
'>'
,
time
()
-
300
)
->
find
();
if
(
!
$note_data
)
{
$note_data
=
$note
->
field
(
'code'
)
->
where
(
'phone'
,
$phone
)
->
where
(
'is_success'
,
1
)
->
whereTime
(
'send_time'
,
'>'
,
time
()
-
300
)
->
order
(
'id DESC'
)
->
find
();
if
(
$code
!=
$note_data
->
code
)
{
return
$this
->
response
(
101
,
'请重新获取验证码'
);
}
}
...
...
@@ -486,13 +487,14 @@ class Member extends Basic
$data
[
'msg'
]
=
''
;
$note
=
new
NoteLog
();
$note_data
=
$note
->
field
(
'id,code,send_time'
)
->
where
([
'phone'
=>
$phone
,
'code'
=>
$code
,
'is_success'
=>
1
,
])
->
whereTime
(
'send_time'
,
'>'
,
time
()
-
300
)
->
find
();
if
(
$note_data
)
{
$note_data
=
$note
->
field
(
'code'
)
->
where
(
'phone'
,
$phone
)
->
where
(
'is_success'
,
1
)
->
whereTime
(
'send_time'
,
'>'
,
time
()
-
300
)
->
order
(
'id DESC'
)
->
find
();
if
(
$code
==
$note_data
->
code
)
{
$data
[
'status'
]
=
200
;
}
else
{
$data
[
'msg'
]
=
'验证码错误'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment