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
8f086b6f
authored
Aug 27, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复邀请无法添加红包的bug
parent
d37619f6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletions
app/Http/Controllers/Controller.php
app/Http/Controllers/InvitesController.php
app/Services/InviteService.php
app/Http/Controllers/Controller.php
View file @
8f086b6f
...
...
@@ -9,6 +9,10 @@ class Controller extends BaseController
{
const
SUCCESS
=
0
;
//请求参数错误
const
INVALID_PARAMETER
=
109000
;
//这个是服务那边返回的错误码,代表已经超出了每日每人可领取的对应项的数额(比如每人每天只能签到一次)
const
INTEGRAL_LIMIT
=
509000
;
...
...
@@ -25,6 +29,9 @@ class Controller extends BaseController
//添加好友邀请失败
const
INVITE_FAIL
=
509004
;
//分享失败
const
SHARE_FAIL
=
509004
;
public
function
Export
(
$Errcode
=
0
,
$ErrMsg
=
''
,
$dataArr
=
[])
{
...
...
app/Http/Controllers/InvitesController.php
View file @
8f086b6f
...
...
@@ -34,9 +34,13 @@ class InvitesController extends Controller
{
$userId
=
$request
->
user
->
user_id
;
$invitedUserId
=
$request
->
get
(
'invited_user_id'
);
if
(
!
$invitedUserId
)
{
return
$this
->
Export
(
self
::
INVALID_PARAMETER
);
}
$map
=
[
'user_id'
=>
$userId
,
'invited_user_id'
=>
$invitedUserId
,
'integral_id'
=>
self
::
INTEGRAL_TYPE_INVITE
,
];
$result
=
$this
->
service
->
addInvite
(
$map
);
if
(
$result
[
'errcode'
]
===
self
::
SUCCESS
)
{
...
...
app/Services/InviteService.php
View file @
8f086b6f
...
...
@@ -18,7 +18,7 @@ class InviteService
public
function
addInvite
(
$map
=
[])
{
$url
=
config
(
'website.BaseUrl'
)
.
'/in
tegral_bill
s/add'
;
$url
=
config
(
'website.BaseUrl'
)
.
'/in
vite
s/add'
;
$result
=
reportCurl
(
$url
,
$map
,
true
);
$result
=
json_decode
(
$result
,
true
);
...
...
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