|
@@ -95,10 +95,6 @@ class ActiveController extends LoveBaseController
|
|
|
*/
|
|
|
public function apply()
|
|
|
{
|
|
|
- if ($this->user->check_status != 2) {
|
|
|
- $this->error('您已报名,正在审核中');
|
|
|
- }
|
|
|
-
|
|
|
$id = $this->request->param('id');
|
|
|
if (empty($id)) {
|
|
|
$this->error('活动不存在或已结束');
|
|
@@ -108,6 +104,11 @@ class ActiveController extends LoveBaseController
|
|
|
$this->error('活动不存在或已结束');
|
|
|
}
|
|
|
|
|
|
+ $check = ActiveApplyModel::get(['active_id'=>$id,'user_id'=>$this->user['id']]);
|
|
|
+ if (!empty($check)) {
|
|
|
+ $this->error('您已报名!');
|
|
|
+ }
|
|
|
+
|
|
|
//参加
|
|
|
ActiveApplyModel::create([
|
|
|
'active_id' => $id,
|