作者 sgj
1 个管道 的构建 通过 耗费 1 秒

添加城市和对应的活动类型

... ... @@ -442,6 +442,11 @@ class IndexController extends RestBaseController
$city_id=input('city_id');
$Activity=new ActivityModel();
$activity=$Activity->selectCityData($city_id);
foreach ($activity as $k=>$v) {
$return[$k]['id']=$v['id'];
$return[$k]['city']=$v['province_name'];
}
$this->success('',$activity);
}
... ...
... ... @@ -78,8 +78,6 @@ class ActivityModel extends Model
if (!empty($type_id)){
$where['a.activity_type'] = $type_id;
}
$data = $this->alias('a')
->field('a.*,p.province_name,act.type_name')
->join('activity_type act','act.id=a.activity_type','LEFT')
... ...