Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -30,10 +30,11 @@ class Index extends BaseCom
|
|||||||
public function room_type_list()
|
public function room_type_list()
|
||||||
{
|
{
|
||||||
$list = db::name('vs_room_type')->where(['status' => 1, 'deletetime' => 0])->field('id,type_name as label_name')->order('sort asc')->select();
|
$list = db::name('vs_room_type')->where(['status' => 1, 'deletetime' => 0])->field('id,type_name as label_name')->order('sort asc')->select();
|
||||||
|
|
||||||
|
//给前面面添加一组数据
|
||||||
|
array_unshift($list, ['id' => -2, 'label_name' => '练歌']);
|
||||||
//给前面添加一组数据
|
//给前面添加一组数据
|
||||||
array_unshift($list, ['id' => -1, 'label_name' => '热门']);
|
array_unshift($list, ['id' => -1, 'label_name' => '热门']);
|
||||||
//给后面添加一组数据
|
|
||||||
array_push($list, ['id' => -2, 'label_name' => '练歌']);
|
|
||||||
return V(1, '获取成功', $list);
|
return V(1, '获取成功', $list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -191,6 +191,9 @@ class Room extends Model
|
|||||||
|
|
||||||
if(!empty($label_id) && $label_id > 0){
|
if(!empty($label_id) && $label_id > 0){
|
||||||
$map['type_id'] = $label_id;
|
$map['type_id'] = $label_id;
|
||||||
|
if($label_id == 1){
|
||||||
|
$map['label_id'] = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(!empty($label_id) && $label_id == -1){
|
if(!empty($label_id) && $label_id == -1){
|
||||||
$map['is_hot'] = 2;
|
$map['is_hot'] = 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user