Commit f0ebf966 by 杨树贤

修复连续请求超时的bug

parent 0ec319e0
......@@ -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项
......
......@@ -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;
......
<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">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment