盲盒转盘-岁月之城,时空之旅,抽奖结果转落包。
-特效限制添加-加开启状态判断
This commit is contained in:
@@ -136,4 +136,13 @@ class BlindBoxTurntable extends BaseCom
|
||||
$reslut = model('BlindBoxTurntableGift')->xlh_ranking_list($room_id,$page,$page_size);
|
||||
return v($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
|
||||
/*
|
||||
* 盲盒转盘状态
|
||||
* 1.开启 2.关闭
|
||||
*/
|
||||
public function blind_box_status(){
|
||||
$reslut = model('BlindBoxTurntableGift')->blind_box_status();
|
||||
return v($reslut['code'], $reslut['msg'], $reslut['data']);
|
||||
}
|
||||
}
|
||||
@@ -464,4 +464,30 @@ class BlindBoxTurntableGift extends Model
|
||||
];
|
||||
}
|
||||
|
||||
//盲盒转盘开启状态
|
||||
public function blind_box_status(){
|
||||
$gift_bag_ids = [11,12];
|
||||
$gift_bag = db::name('vs_gift_bag')->where(['id'=>['in',$gift_bag_ids]])->select();
|
||||
foreach ($gift_bag as $bag){
|
||||
if($bag['status'] == 1){
|
||||
$result_data[] = [
|
||||
'gift_bag_id' => $bag['id'],
|
||||
'name' => $bag['name'],
|
||||
'status' => 1,
|
||||
'status_str' => '开启中',
|
||||
'icon' => $bag['icon'],
|
||||
];
|
||||
}else{
|
||||
$result_data[] = [
|
||||
'gift_bag_id' => $bag['id'],
|
||||
'name' => $bag['name'],
|
||||
'status' => 0,
|
||||
'status_str' => '未开启',
|
||||
'icon' => $bag['icon'],
|
||||
];
|
||||
}
|
||||
}
|
||||
return ['code' => 1, 'msg' => '成功', 'data' => $result_data];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1360,9 +1360,8 @@ class BlindBoxTurntableGiftDrawWorldNew extends Model
|
||||
$probability_adjustments = [
|
||||
// 示例:用户ID为1001的用户抽中礼物ID为2001的概率降低为原来的50%
|
||||
// 1001 => [2001 => 0.5],
|
||||
|
||||
//测试数据
|
||||
20060 => [$selected_gift_id => 2],
|
||||
// 20060 => [$selected_gift_id => 2],
|
||||
|
||||
// 在这里可以添加更多规则 【正式规则】
|
||||
21222 => [$selected_gift_id => 6],
|
||||
|
||||
Reference in New Issue
Block a user