房间类型列表加排序

This commit is contained in:
2025-09-12 18:00:18 +08:00
parent 36ef5ce1e5
commit 2664da6628

View File

@@ -29,7 +29,7 @@ class Index extends BaseCom
//房间类型列表
public function room_type_list()
{
$list = db::name('vs_room_type')->where('status', 1)->field('id,type_name as label_name')->select();
$list = db::name('vs_room_type')->where('status', 1)->field('id,type_name as label_name')->order('sort asc')->select();
//给前面添加一组数据
array_unshift($list, ['id' => -1, 'label_name' => '热门']);
return V(1, '获取成功', $list);