Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_welfare
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
f0ebf966
authored
Aug 17, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复连续请求超时的bug
parent
0ec319e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
43 deletions
app/Http/Controllers/IntegralBillsController.php
app/Http/Services/BaseService.php
resources/views/web/integralBillList.blade.php
app/Http/Controllers/IntegralBillsController.php
View file @
f0ebf966
...
...
@@ -39,10 +39,9 @@ class IntegralBillsController extends Controller
$this
->
data
[
'title'
]
=
'红包详细'
;
//获取该用户的红包信息
// $userIntegralService = new UserIntegralService();
// $userIntegral = $userIntegralService->getUserIntegral($request->user_id);
// $this->data['user_integral'] = array_get($userIntegral,'data');
// dd( $this->data['user_integral']);
$userIntegralService
=
new
UserIntegralService
();
$userIntegral
=
$userIntegralService
->
getUserIntegral
(
$request
->
user_id
);
$this
->
data
[
'user_integral'
]
=
array_get
(
$userIntegral
,
'data'
);
$integralService
=
new
IntegralService
();
//获取红包列表做tab项
...
...
app/Http/Services/BaseService.php
View file @
f0ebf966
...
...
@@ -14,8 +14,8 @@ class BaseService
public
function
__construct
()
{
$this
->
client
=
new
Client
([
//
'base_uri' => '192.168.10.10:61009',
'base_uri'
=>
'http://ic_server_welfare.test'
,
'base_uri'
=>
'192.168.10.10:61009'
,
//
'base_uri' => 'http://ic_server_welfare.test',
'timeout'
=>
20
,
]);
}
...
...
@@ -25,7 +25,7 @@ class BaseService
$response
=
$this
->
client
->
request
(
'GET'
,
$requestPath
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$data
[
'errcode'
]
!==
0
)
{
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
}
return
$data
;
...
...
@@ -38,7 +38,7 @@ class BaseService
$response
=
$this
->
client
->
request
(
'DELETE'
,
$requestPath
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$data
[
'errcode'
]
!==
0
)
{
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
}
return
$data
;
...
...
@@ -51,7 +51,7 @@ class BaseService
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$data
[
'errcode'
]
!==
0
)
{
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
}
return
$data
;
...
...
@@ -64,7 +64,7 @@ class BaseService
);
$data
=
json_decode
(
$response
->
getBody
()
->
getContents
(),
true
);
if
(
$data
[
'errcode'
]
!==
0
)
{
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
Log
::
Error
(
$requestPath
.
'---'
.
$data
[
'errcode'
]
.
$data
[
'errmsg'
]);
}
return
$data
;
...
...
resources/views/web/integralBillList.blade.php
View file @
f0ebf966
<div
class=
"layui-card"
>
{{--
<div
class=
"layui-card-body"
style=
"padding-top: 20px"
>
--}}
{{--
<div
class=
"layui-row"
>
--}}
{{--
<div
class=
"layui-col-sm6 layui-col-md4"
>
--}}
{{--
<div
class=
"layui-card"
>
--}}
{{--
<div
class=
"layui-card-header"
>
--}}
{{-- 用户已得红包--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-card-body layuiadmin-card-list"
>
--}}
{{--
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['integral']}}
</p>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
<div
class=
"layui-card-body"
style=
"padding-top: 20px"
>
<div
class=
"layui-row"
>
<div
class=
"layui-col-sm6 layui-col-md4"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
用户已得红包
</div>
<div
class=
"layui-card-body layuiadmin-card-list"
>
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['integral']}}
</p>
</div>
</div>
</div>
{{--
<div
class=
"layui-col-sm6 layui-col-md4"
>
--}}
{{--
<div
class=
"layui-card"
>
--}}
{{--
<div
class=
"layui-card-header"
>
--}}
{{-- 已提现红包--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-card-body layuiadmin-card-list"
>
--}}
{{--
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['exchanged_integral']}}
</p>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
<div
class=
"layui-col-sm6 layui-col-md4"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
已提现红包
</div>
<div
class=
"layui-card-body layuiadmin-card-list"
>
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['exchanged_integral']}}
</p>
</div>
</div>
</div>
{{--
<div
class=
"layui-col-sm6 layui-col-md4"
>
--}}
{{--
<div
class=
"layui-card"
>
--}}
{{--
<div
class=
"layui-card-header"
>
--}}
{{-- 账户剩余红包--}}
{{--
</div>
--}}
{{--
<div
class=
"layui-card-body layuiadmin-card-list"
>
--}}
{{--
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['integral']-$user_integral['exchanged_integral']}}
</p>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
{{--
</div>
--}}
<div
class=
"layui-col-sm6 layui-col-md4"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-header"
>
账户剩余红包
</div>
<div
class=
"layui-card-body layuiadmin-card-list"
>
<p
class=
"layuiadmin-big-font"
>
{{$user_integral['integral']-$user_integral['exchanged_integral']}}
</p>
</div>
</div>
</div>
</div>
<div
class=
"layui-tab layui-tab-brief"
lay-filter=
"integralTab"
>
<ul
class=
"layui-tab-title"
>
...
...
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