Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare_api
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
afeb7343
authored
Aug 28, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加用户邀请统计信息接口
parent
c720e609
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
app/Http/Controllers/InvitesController.php
app/Services/InviteService.php
routes/web.php
app/Http/Controllers/InvitesController.php
View file @
afeb7343
...
...
@@ -49,4 +49,12 @@ class InvitesController extends Controller
return
$this
->
Export
(
self
::
INVITE_FAIL
);
}
}
public
function
info
(
Request
$request
)
{
$userId
=
$request
->
user
->
user_id
;
$result
=
$this
->
service
->
getInviteInfo
([
'user_id'
=>
$userId
]);
return
$this
->
Export
(
0
,
'ok'
,
$result
);
}
}
\ No newline at end of file
app/Services/InviteService.php
View file @
afeb7343
...
...
@@ -41,4 +41,13 @@ class InviteService extends BaseService
return
$result
;
}
public
function
getInviteInfo
(
$map
=
[])
{
$url
=
config
(
'website.BaseUrl'
)
.
'/invites/info'
;
$result
=
reportCurl
(
$url
,
$map
,
true
);
$result
=
json_decode
(
$result
,
true
);
return
$result
;
}
}
\ No newline at end of file
routes/web.php
View file @
afeb7343
...
...
@@ -54,6 +54,7 @@ $router->group(['middleware' => ['web', 'login']], function () use ($router) {
//邀请好友
$router
->
post
(
'invites/add'
,
'InvitesController@store'
);
$router
->
get
(
'invites/list'
,
'InvitesController@index'
);
$router
->
get
(
'invites/info'
,
'InvitesController@info'
);
});
$router
->
group
([
'middleware'
=>
'web'
],
function
()
use
(
$router
)
{
...
...
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