This commit is contained in:
彭桃 2023-02-08 17:55:19 +08:00
parent 60809104a8
commit 7fa82136c5

View File

@ -43,6 +43,7 @@ class Village extends BaseController
$where['status'] = 1;
$list = Db::table('fa_szxc_village')
->where($where)
->where('village_id','<>',0)
->page($page,10)
->field('id,title,address,people_num,images,views,likes,createtime,area_id,street_id,village_id')
->order('likes desc')
@ -84,8 +85,10 @@ class Village extends BaseController
{
$where['status'] = 1;
$list = Db::table('fa_szxc_village')
->where($where)
->where('village_id','<>',0)
->page($page,$limit)
->field('id,title,address,people_num,images,views,likes,createtime,area_id,street_id,village_id')
->order('likes desc')
@ -239,6 +242,7 @@ class Village extends BaseController
$where[] = ['address', 'like', '%'.$keyword.'%'];
$list = Db::table('fa_szxc_village')
->where($where)
->where('village_id','<>',0)
->field('id,title,address,people_num,images,views,likes,createtime')
->order('likes desc')
->withAttr('images', function ($value, $data) {