房间关系
This commit is contained in:
@@ -12,7 +12,18 @@ class RoomAuction extends Model
|
|||||||
public function room_relation_list($type_id)
|
public function room_relation_list($type_id)
|
||||||
{
|
{
|
||||||
$list = db::name('vs_relation')->field('id as relation_id,name,type,icon')->where(['type' => $type_id,'delete_time' => 0])->select();
|
$list = db::name('vs_relation')->field('id as relation_id,name,type,icon')->where(['type' => $type_id,'delete_time' => 0])->select();
|
||||||
return ['code' => 1, 'msg' => '操作成功','data' => $list];
|
if($list){
|
||||||
|
$relation_array = [
|
||||||
|
'relation_id' => 0,
|
||||||
|
'name' => '无关系',
|
||||||
|
'type' => 0,
|
||||||
|
'icon' => db::name('vs_relation')->where(['id' => 0])->value('icon'),
|
||||||
|
];
|
||||||
|
$lists = array_merge([$relation_array], (array)$list);
|
||||||
|
}else{
|
||||||
|
$lists = [];
|
||||||
|
}
|
||||||
|
return ['code' => 1, 'msg' => '操作成功','data' => $lists];
|
||||||
}
|
}
|
||||||
|
|
||||||
//礼物计算时间
|
//礼物计算时间
|
||||||
|
|||||||
Reference in New Issue
Block a user