Commit 6191a5be by 杨树贤

修复bug

parent ea7c42c2
......@@ -25,7 +25,7 @@ class AssistsApiController extends Controller
return $this->apiReturn(0, 'ok', [
'data' => $data['data'],
'count' => $data['count'],
'count' => array_get($data,'count',0),
]);
}
......
......@@ -25,7 +25,7 @@ class CodesApiController extends Controller
return $this->apiReturn(0, 'ok', [
'data' => $data['data'],
'count' => $data['count'],
'count' => array_get($data,'count',0),
]);
}
......
......@@ -30,6 +30,9 @@ class ExchangeSettingsApiController extends Controller
private function transformer($data)
{
if (!is_array($data['data'])) {
return $data;
}
foreach ($data['data'] as &$item) {
$item['status'] = $item['status'] ? '使用中' : '已停用';
$item['add_time'] = date('Y-m-d H:i:s', $item['add_time']);
......
......@@ -25,7 +25,7 @@ class IntegralsApiController extends Controller
return $this->apiReturn(0, 'ok', [
'data' => $data['data'],
'count' => $data['count'],
'count' => array_get($data,'count',0),
]);
}
......
......@@ -27,7 +27,7 @@ class InvitesApiController extends Controller
return $this->apiReturn(0, 'ok', [
'data' => $data['data'],
'count' => $data['count'],
'count' => array_get($data,'count',0),
]);
}
......
......@@ -17,6 +17,9 @@ class UserExchangeTransformer
public function transform($data)
{
if (!is_array($data['data'])) {
return $data;
}
$userIds = array_column($data['data'], 'user_id');
$userMobiles = [];
$certifications = [];
......
......@@ -17,6 +17,9 @@ class UserIntegralTransformer
public function transform($data)
{
if (!is_array($data['data'])) {
return $data;
}
$userIds = array_column($data['data'], 'user_id');
$userMobiles = [];
$certifications = [];
......
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