Commit f994717a authored by sugar's avatar sugar

首页样谱

parent ec8d9f6f
......@@ -76,8 +76,13 @@ class Article extends Api{
$page = $this->request->post('page',1);
$keywords = $this->request->post('keywords','');
$action = $this->request->post('action','');//center:个人中心自己发表的文章
$type = $this->request->post('type',1);//1:推荐 2:同姓 3:同城 4:同县
$type = $this->request->post('type',1);//1:推荐 2:同姓 3:同城 4:同县 5:同村
$province_id = $this->request->post('province_id',0);
$city_id = $this->request->post('city_id',0);
$area_id = $this->request->post('area_id',0);
$town_id = $this->request->post('town_id',0);
$village_id = $this->request->post('village_id',0);
$where['ea.status'] = 0;
$uid = $this->auth->id;
$people = Db::name('family_people')->where(['user_id' =>$uid])->find();
......@@ -105,6 +110,19 @@ class Article extends Api{
case 4:
$where['ea.area_id'] = $area_id;
break;
case 5:
if(!$this->auth->village_id){
$addr_arr = [
'province_id' =>$province_id,
'city_id' =>$city_id,
'area_id' =>$area_id,
'town_id' =>$town_id,
'village_id' =>$village_id,
];
\app\common\model\User::update($addr_arr,['id' =>$this->auth->id]);
}
$where['ea.village_id'] = $village_id;
break;
}
$list = Ethnography::alias('ea')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment