...
|
...
|
@@ -383,7 +383,6 @@ class HouseBoard extends Api |
|
|
*
|
|
|
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
|
|
|
* @ApiParams (name="house_id", type="inter", required=true, description="社区id")
|
|
|
* @ApiParams (name="user_id", type="inter", required=true, description="社区物业管理员用户id")
|
|
|
*
|
|
|
* @ApiReturn({
|
|
|
"code": 1,
|
...
|
...
|
@@ -391,11 +390,11 @@ class HouseBoard extends Api |
|
|
"time": "1598587213",
|
|
|
"data": [
|
|
|
{
|
|
|
"id": 29,
|
|
|
"title": "1",
|
|
|
"content": "1",
|
|
|
"activity_time": "2020-08-28-2020-08-28",
|
|
|
"status": "已到期"
|
|
|
"id": // 活动id
|
|
|
"title": // 活动标题
|
|
|
"content": // 活动描述
|
|
|
"activity_time": 活动日期
|
|
|
"status": // 活动状态
|
|
|
}
|
|
|
]
|
|
|
})
|
...
|
...
|
@@ -404,6 +403,7 @@ class HouseBoard extends Api |
|
|
{
|
|
|
$user_id = $this->auth->id;
|
|
|
$house_id = $this->request->param('house_id'); //社区id
|
|
|
empty($house_id) && $this->error('缺少必要参数');
|
|
|
$now = time();
|
|
|
$list = Db::name('house_activity')
|
|
|
->alias('ha')
|
...
|
...
|
@@ -423,7 +423,7 @@ class HouseBoard extends Api |
|
|
$v['activity_time'] = date('Y-m-d',$v['start_time']).'-'.date('Y-m-d',$v['end_time']);
|
|
|
// 活动日期
|
|
|
$v['status'] = $v['join_status'] == 1 ? '已报名' : ($v['end_time'] < time() ? '已到期' : '未报名');
|
|
|
unset($v['start_time'],$v['end_time'],$v['join_status'],);
|
|
|
unset($v['start_time'],$v['end_time'],$v['join_status']);
|
|
|
}
|
|
|
$this->success('success',$list);
|
|
|
}
|
...
|
...
|
|