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
352f4d9b
authored
Sep 25, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
泰添加邀请限制
parent
b520c97f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
app/Http/Controllers/Controller.php
app/Http/Controllers/InvitesController.php
config/language.php
app/Http/Controllers/Controller.php
View file @
352f4d9b
...
...
@@ -24,6 +24,9 @@ class Controller extends BaseController
//不能助力了(助力人数已满或者用户已经助力过)
const
CAN_NOT_ASSIST
=
109009
;
//不能助力了(助力人数已满或者用户已经助力过)
const
CAN_NOT_INVITE_MYSELF
=
109010
;
const
EXCHANGED_TODAY
=
109100
;
...
...
app/Http/Controllers/InvitesController.php
View file @
352f4d9b
...
...
@@ -24,8 +24,8 @@ class InvitesController extends Controller
public
function
index
(
Request
$request
)
{
$map
=
[
'user_id'
=>
$request
->
user
->
user_id
,
'page'
=>
$request
->
get
(
'page'
),
'user_id'
=>
$request
->
user
->
user_id
,
'page'
=>
$request
->
get
(
'page'
),
'page_size'
=>
$request
->
get
(
'page_size'
),
];
$result
=
$this
->
service
->
getInviteList
(
$map
);
...
...
@@ -37,6 +37,9 @@ class InvitesController extends Controller
{
$invitedUserId
=
$request
->
user
->
user_id
;
$userId
=
$request
->
get
(
'user_id'
);
if
(
$userId
==
$invitedUserId
)
{
return
$this
->
Export
(
self
::
CAN_NOT_INVITE_MYSELF
);
}
if
(
!
$invitedUserId
)
{
return
$this
->
Export
(
self
::
INVALID_PARAMETER
);
}
...
...
config/language.php
View file @
352f4d9b
...
...
@@ -17,6 +17,7 @@ return [
109007
=>
'已经兑换过红包码,不能再兑换'
,
109008
=>
'自己不能助力自己'
,
109009
=>
'助力人数已满或者您已经助力过'
,
109010
=>
'自己不能邀请自己'
,
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