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
34cf51c9
Commit
34cf51c9
authored
Dec 15, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
变量名和二维码类名修改
parent
f4ba4ae3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
Member.php
application/api/controller/Member.php
+5
-5
GenerateCodeUntils.php
application/api/untils/GenerateCodeUntils.php
+1
-1
No files found.
application/api/controller/Member.php
View file @
34cf51c9
...
...
@@ -45,7 +45,7 @@ class Member extends Basic
$data
[
'data'
]
=
$user_data
->
getData
();
$data
[
'data'
][
'last_login_ip'
]
=
long2ip
(
$data
[
'data'
][
'last_login_ip'
]);
$data
[
'data'
][
'
a
uthToken'
]
=
$jwt
->
createToken
(
$jwt_data
);
$data
[
'data'
][
'
A
uthToken'
]
=
$jwt
->
createToken
(
$jwt_data
);
$data
[
'msg'
]
=
'登陆成功'
;
$data
[
'status'
]
=
200
;
Session
::
set
(
'u_user'
,
$data
[
'data'
]);
...
...
@@ -182,13 +182,13 @@ class Member extends Basic
$jwt_phone
=
$jwt_data
[
'data'
][
'phone'
];
$note
=
new
NoteLog
();
$note_data
=
$note
->
field
(
'send_time'
)
->
where
([
$note_data
=
$note
->
field
(
'
id,code,
send_time'
)
->
where
([
'phone'
=>
$phone
,
'code'
=>
$code
,
'is_success'
=>
1
])
->
find
();
if
(
time
()
-
strtotime
(
$note_data
->
send_time
)
->
send_time
>
18000
)
{
if
(
time
()
-
strtotime
(
$note_data
->
send_time
)
>
18000
)
{
return
$this
->
response
(
101
,
'请重新获取验证码'
);
}
...
...
@@ -225,7 +225,7 @@ class Member extends Basic
$jwt_data
[
'phone'
]
=
$insert_data
[
'user_phone'
];
$jwt
=
new
JwtUntils
();
$insert_data
[
'
a
uthToken'
]
=
$jwt
->
createToken
(
$jwt_data
);
$insert_data
[
'
A
uthToken'
]
=
$jwt
->
createToken
(
$jwt_data
);
$insert_data
[
'id'
]
=
$this
->
user
->
id
;
Session
::
set
(
'u_user'
,
$insert_data
[
'data'
]);
//登录
...
...
@@ -342,7 +342,7 @@ class Member extends Basic
$result
=
$this
->
user
->
where
(
'status'
,
0
)
->
where
(
'id'
,
$parms
[
'id'
])
->
find
();
if
(
$result
)
{
$code
=
new
\app\api\untils\GenerateCode
();
$code
=
new
\app\api\untils\GenerateCode
Untils
();
$url
=
$this
->
request
->
domain
()
.
'/test.html?referrer_source=0&id='
.
$result
->
id
;
$path
=
$code
->
getCode
(
$url
,
$result
->
id
);
$data
[
'data'
]
=
[
'path'
=>
$this
->
request
->
domain
()
.
'/'
.
$path
];
...
...
application/api/untils/GenerateCode.php
→
application/api/untils/GenerateCode
Untils
.php
View file @
34cf51c9
...
...
@@ -6,7 +6,7 @@ use Endroid\QrCode\QrCode;
*
* @author fuju
*/
class
GenerateCode
{
class
GenerateCode
Untils
{
/**
* 生成二维码
*
...
...
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