查看错误

This commit is contained in:
2025-10-14 11:57:05 +08:00
parent 51b78a0be3
commit 2eaa7360e9
2 changed files with 2 additions and 2 deletions

View File

@@ -98,7 +98,7 @@ class Redpacket extends BaseCom
// 获取房间内红包列表 // 获取房间内红包列表
public function roomRedPackets() public function roomRedPackets()
{ {
$roomId = $this->request->get('room_id'); $roomId = $this->request->post('room_id');
$result = Db::name('redpacket')->where(['room_id' => $roomId, 'status' => ['<=',1]])->select(); $result = Db::name('redpacket')->where(['room_id' => $roomId, 'status' => ['<=',1]])->select();
if($result){ if($result){
foreach ($result as &$item) { foreach ($result as &$item) {

View File

@@ -100,7 +100,7 @@ class Redpacket extends Model
'start_time' => $startTime, 'start_time' => $startTime,
'end_time' => $endTime, 'end_time' => $endTime,
'createtime' => time(), 'createtime' => time(),
'remark' => empty($data['remark']) ?? '大吉大利,红包拿来啦!' 'remark' => !empty($data['remark']) ? $data['remark'] : '大吉大利,红包拿来啦!'
]; ];
$redpacketId = $this->insertGetId($redpacketData); $redpacketId = $this->insertGetId($redpacketData);