抢红包优化,红包详情优化
This commit is contained in:
@@ -141,11 +141,15 @@ class RedpacketService
|
|||||||
|
|
||||||
// 获取抢红包结果详情
|
// 获取抢红包结果详情
|
||||||
$grabResult = $this->getGrabResult($redpacketId, $userId);
|
$grabResult = $this->getGrabResult($redpacketId, $userId);
|
||||||
|
unset($grabResult['previous_records']);//前端不要
|
||||||
|
unset($grabResult['all_records']);//前端不要
|
||||||
|
unset($grabResult['statistics']);//前端不要
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'code' => 1,
|
'code' => 1,
|
||||||
'msg' => '抢红包成功',
|
'msg' => '抢红包成功',
|
||||||
'data' => $grabResult
|
// 'data' => $grabResult
|
||||||
|
'data' => null
|
||||||
];
|
];
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -354,7 +358,7 @@ class RedpacketService
|
|||||||
public function getDetail($redpacketId, $currentUserId = 0)
|
public function getDetail($redpacketId, $currentUserId = 0)
|
||||||
{
|
{
|
||||||
$redpacketModel = new Redpacket();
|
$redpacketModel = new Redpacket();
|
||||||
$redpacket = $redpacketModel->getRedpacketInfo($redpacketId);
|
$redpacket['redpacket_info'] = $redpacketModel->getRedpacketInfo($redpacketId);
|
||||||
|
|
||||||
if (!$redpacket) {
|
if (!$redpacket) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user