抢红包优化,红包详情优化

This commit is contained in:
2025-10-14 09:44:29 +08:00
parent b42d87294d
commit 4d22b53936

View File

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