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
5c44caf3
authored
Aug 29, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
去除多余代码
parent
343dc58f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
21 deletions
app/Http/Controllers/Controller.php
app/Http/Controllers/UserExchangesController.php
routes/web.php
app/Http/Controllers/Controller.php
View file @
5c44caf3
...
...
@@ -38,6 +38,7 @@ class Controller extends BaseController
//好友助力失败
const
ASSIST_FAIL
=
509007
;
public
function
Export
(
$Errcode
=
0
,
$ErrMsg
=
''
,
$dataArr
=
[])
{
return
Export
(
$Errcode
,
$ErrMsg
,
$dataArr
);
...
...
app/Http/Controllers/UserExchangesController.php
View file @
5c44caf3
...
...
@@ -69,31 +69,16 @@ class UserExchangesController extends Controller
];
//如果类型是微信转账,则前提是要两个好友助力完成才能成功
//添加兑换记录并且提现
$result
=
$service
->
addUserExchangeAndQuota
(
$data
);
//这里直接使用服务返回的错误码,对应的错误码在language.php
return
$this
->
Export
(
$result
[
'errcode'
]);
}
if
(
$result
[
'errcode'
]
==
0
)
{
return
$this
->
Export
(
$result
[
'errcode'
],
'ok'
,
$result
[
'data'
]);
}
else
{
return
$this
->
Export
(
$result
[
'errcode'
]);
}
/**
* 好友助力接口
* @param Request $request
*/
public
function
assist
(
Request
$request
)
{
$userId
=
$request
->
user
->
user_id
;
}
/**
* 兑换详情接口
*/
public
function
info
(
Request
$request
)
{
$userId
=
$request
->
user
->
user_id
;
$type
=
$request
->
get
(
'type'
);
//根据不同类型找到不同的提现信息
}
}
\ No newline at end of file
routes/web.php
View file @
5c44caf3
...
...
@@ -50,6 +50,9 @@ $router->group(['middleware' => ['web', 'login']], function () use ($router) {
//红包兑换
$router
->
addRoute
([
'GET'
,
'POST'
],
'codes/exchange'
,
'CodesController@store'
);
//好友助力
$router
->
get
(
'assists/list'
,
'AssistsController@index'
);
$router
->
addRoute
([
'GET'
,
'POST'
],
'assists/add'
,
'AssistsController@store'
);
});
...
...
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