From 266c90cd09709c468887598716745a86c20ffe51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Sat, 16 Aug 2025 11:15:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E5=A2=9E=E5=8A=A0=20?= =?UTF-8?q?=E7=A4=BC=E7=89=A9=E4=BA=8C=E7=BA=A7=E5=88=86=E7=B1=BB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=20-=20=E5=85=BC=E5=AE=B9=E9=99=A4=E6=99=AE=E9=80=9A?= =?UTF-8?q?=E7=A4=BC=E7=89=A9=E5=A4=96=E6=94=AF=E6=8C=81=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/adminapi/controller/Gift.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/application/adminapi/controller/Gift.php b/application/adminapi/controller/Gift.php index 57507fa..e7d8672 100644 --- a/application/adminapi/controller/Gift.php +++ b/application/adminapi/controller/Gift.php @@ -44,8 +44,12 @@ class Gift extends adminApi } } if($type == 2){ - $type_id = input('type_id', 1); - $giftTypeData = db::name('vs_gift_label')->where('delete_time',0)->where('tid',$type_id)->order("sort asc,id desc")->select(); + $type_id = input('type_id', 0); + $where['delete_time'] = 0; + if(!empty($type_id)){ + $where['tid'] = $type_id; + } + $giftTypeData = db::name('vs_gift_label')->where($where)->order("sort asc,id desc")->select(); foreach ($giftTypeData as $key => $value) { $giftType[$key]['id'] = $value['id']; $giftType[$key]['name'] = $value['name'];