@@ -68,7 +68,7 @@ class Gift extends Model
|
||||
// if($room_id){
|
||||
// $is_open_blind_box_turntable = Db::name('vs_room')->where(['id'=>$room_id])->value('is_open_blind_box_turntable');
|
||||
// }
|
||||
$list = $this->field('gid as gift_id,gift_name,base_image,gift_price,icon')->where($map)->where($where)->order('sort desc, gift_price asc')->select();
|
||||
$list = $this->field('gid as gift_id,gift_name,base_image,gift_price,icon')->where($map)->where($where)->order('sort asc, gift_price asc')->select();
|
||||
if($label==2){
|
||||
$list_data = [];
|
||||
foreach ($list as &$v) {
|
||||
@@ -104,9 +104,9 @@ class Gift extends Model
|
||||
}
|
||||
}
|
||||
}
|
||||
// usort($list_data, function($a, $b) {
|
||||
// return $a['gift_id'] <=> $b['gift_id'];
|
||||
// });
|
||||
usort($list_data, function($a, $b) {
|
||||
return $a['gift_id'] <=> $b['gift_id'];
|
||||
});
|
||||
$list = $list_data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user