巡乐会抽奖接口提交.-礼物列表修改

This commit is contained in:
2025-08-29 10:36:26 +08:00
parent 96fb09e015
commit dcb4c840ba
2 changed files with 10 additions and 2 deletions

View File

@@ -170,7 +170,15 @@ class BlindBox extends adminApi
*/
public function blind_box_gifts(){
$type = input('type', 2);
$list = db::name("vs_gift")->where(['type'=>$type,'delete_time'=>0])->order('sort','asc')->select();
$label = input('label', 0);
$where['delete_time'] = 0;
if($type){
$where['type'] = $type;
}
if($label){
$where['label'] = $label;
}
$list = db::name("vs_gift")->where($where)->order('sort','asc')->select();
$list_data = [];
foreach ($list as $k=>$v){
$list_data[$k]['gid'] = $v['gid'];