From d6bbdefb0a624aa002bf99f3aa953143356e8334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 15 Oct 2025 17:12:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BA=A2=E5=8C=85=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/service/RedpacketService.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/application/common/service/RedpacketService.php b/application/common/service/RedpacketService.php index 1f3f6a6..d89e869 100644 --- a/application/common/service/RedpacketService.php +++ b/application/common/service/RedpacketService.php @@ -93,7 +93,14 @@ class RedpacketService 'msg' => '已经抢过该红包', 'data' => ['code' => 2] //1-抢到了,2-已经抢过红包,3-没有抢到 ]; - }else{ + }elseif ($message == '红包已结束') { + return [ + 'code' => 1, + 'msg' => '手慢了,红包已抢完', + 'data' => ['code' => 3] //1-抢到了,2-已经抢过红包,3-没有抢到 + ]; + } + else{ return [ 'code' => 0, 'msg' => $message, From 18944ddcbc5aa7021fb691603877d5de61a0f093 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Wed, 15 Oct 2025 17:16:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BA=A2=E5=8C=85=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Redpacket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/api/controller/Redpacket.php b/application/api/controller/Redpacket.php index 51741e4..5df6159 100644 --- a/application/api/controller/Redpacket.php +++ b/application/api/controller/Redpacket.php @@ -72,7 +72,7 @@ class Redpacket extends BaseCom */ public function detail() { - $redpacketId = $this->request->get('redpacket_id'); + $redpacketId = $this->request->post('redpacket_id'); if (empty($redpacketId)) { return V(0, '红包ID不能为空');