Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
backend
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
backend
Commits
384a450d
Commit
384a450d
authored
Jul 04, 2022
by
张天炜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
adbb75a5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
application/api/controller/User.php
+1
-1
No files found.
application/api/controller/User.php
View file @
384a450d
...
...
@@ -88,6 +88,7 @@ class User extends Base
$user
->
ip
=
request
()
->
ip
();
if
(
$user
->
save
())
{
// 注册成功
$user
=
UserModel
::
where
([
'openid'
=>
$response
->
openid
])
->
find
();
$token
=
$this
->
usertoken
(
$user
);
return
[
"code"
=>
0
,
"msg"
=>
"注册成功"
,
"token"
=>
$token
,
"user"
=>
$user
];
}
else
{
...
...
@@ -293,7 +294,6 @@ class User extends Base
$user
->
ip
=
request
()
->
ip
();
if
(
$user
->
save
())
{
// 注册成功
$user
=
UserModel
::
where
([
'openid'
=>
$data
->
openId
])
->
find
();
$token
=
$this
->
usertoken
(
$user
);
return
[
"code"
=>
0
,
"msg"
=>
"注册成功"
,
"token"
=>
$token
,
"user"
=>
$user
];
}
else
{
...
...
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