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
ed9df7eb
authored
Sep 05, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加红包码验证
parent
b53c7874
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
1 deletions
app/Http/Controllers/CodesController.php
app/Http/Controllers/Controller.php
config/language.php
app/Http/Controllers/CodesController.php
View file @
ed9df7eb
...
...
@@ -47,7 +47,9 @@ class CodesController extends Controller
$amount
=
array_get
(
$integral
,
'amount'
);
$res
[
'data'
][
'amount'
]
=
$amount
;
return
$this
->
Export
(
0
,
'ok'
,
$res
);
return
$this
->
Export
(
0
,
'ok'
,
$res
);
}
elseif
(
$result
[
'errcode'
]
===
self
::
EXCHANGED_CODE
)
{
return
$this
->
Export
(
self
::
EXCHANGED_CODE
);
}
else
{
return
$this
->
Export
(
self
::
EXCHANGE_CODE_FAIL
);
}
...
...
app/Http/Controllers/Controller.php
View file @
ed9df7eb
...
...
@@ -17,6 +17,8 @@ class Controller extends BaseController
const
CAN_NOT_EXCHANGE
=
109005
;
//红包码无效
const
INVALID_CODE
=
109006
;
//已经兑换过红包码,不能再兑换
const
EXCHANGED_CODE
=
109007
;
const
EXCHANGED_TODAY
=
109100
;
//这个是服务那边返回的错误码,代表已经超出了每日每人可领取的对应项的数额(比如每人每天只能签到一次)
...
...
config/language.php
View file @
ed9df7eb
...
...
@@ -14,6 +14,7 @@ return [
109004
=>
'请求参数不正确'
,
109005
=>
'用户无法兑换,用户未认证'
,
109006
=>
'红包码无效'
,
109007
=>
'已经兑换过红包码,不能再兑换'
,
109100
=>
'今天已经兑换过了,请明天再来吧'
,
109101
=>
'兑换名额被抢光了'
,
...
...
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