作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

社区每周可发布公告次数

... ... @@ -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();
... ...
... ... @@ -35,9 +35,11 @@ return array (
'mail_smtp_pass' => 'password',
'mail_verify_type' => '2',
'mail_from' => '10000@qq.com',
'contact' => '',
'settled' => '',
'contact' => '联系我们喲',
'settled' => '<span style="white-space:normal;">联系我们喲</span>',
'send_score' => '800',
'withdraw_percent' => '100',
'withdraw_rule' => '',
'withdraw_rule' => '<br />',
'phone' => '010-12345678',
'house_board_count' => '2',
);
\ No newline at end of file
... ...