...
|
...
|
@@ -376,7 +376,9 @@ class HouseAdmin extends Api |
|
|
$count = HouseBoard::whereTime('createtime', 'week')
|
|
|
->where('house_id',$house_id)
|
|
|
->count();
|
|
|
$times = $count >= 2 ? 0 : 2-$count;
|
|
|
// 社区每周可发布公告次数
|
|
|
$house_board_count = config('site.house_board_count');
|
|
|
$times = $count >= $house_board_count ? 0 : $house_board_count-$count;
|
|
|
$this->success('success',compact('times'));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -408,7 +410,9 @@ class HouseAdmin extends Api |
|
|
$count = HouseBoard::whereTime('createtime', 'week')
|
|
|
->where('house_id',$post['house_id'])
|
|
|
->count();
|
|
|
$count >= 2 && $this->error('本周发布次数已用完');
|
|
|
// 社区每周可发布公告次数
|
|
|
$house_board_count = config('site.house_board_count');
|
|
|
$count >= $house_board_count && $this->error('本周发布次数已用完');
|
|
|
$images = $this->request->param('images/a');
|
|
|
$post['images'] = implode(',',$images);
|
|
|
Db::startTrans();
|
...
|
...
|
|