From 58d74112430ce289349da1ae4141c115871c045b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Mon, 13 Oct 2025 16:36:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E5=89=8D=E7=AB=AF=E6=8E=A8=E9=80=81?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/model/Redpacket.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/common/model/Redpacket.php b/application/common/model/Redpacket.php index 9a11f87..86d9ff2 100644 --- a/application/common/model/Redpacket.php +++ b/application/common/model/Redpacket.php @@ -80,7 +80,8 @@ class Redpacket extends Model } // 计算开始时间 $startTime = $data['countdown'] > 0 ? (time() + $data['countdown']) : time(); - $endTime = $startTime + 1200; // 2分钟后结束 + //获取配置项 红包没有抢完所展示时间 + $endTime = $startTime + get_system_config_value('red_packet_time') ?? 120; // 默认2分钟后结束 // 创建红包 $redpacketData = [ @@ -126,6 +127,7 @@ class Redpacket extends Model $data['avatar'] = Db::name('user')->where('id', $data['user_id'])->value('avatar'); $data['redpacket_id'] = $redpacketId; $data['start_time'] = $startTime; + $data['red_packet_time'] = get_system_config_value('red_packet_time'); $text = [ 'redpacketInfo' => $data, 'text' => ''