linwu 1 year ago
parent
commit
da675010e7

+ 5 - 4
app/love/controller/ActiveController.php

@@ -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,

+ 1 - 1
public/themes/admin_simpleboot3/love/admin_active/apply_list.html

@@ -31,7 +31,7 @@
             </thead>
             <foreach name="list" item="vo">
                 <tr>
-                    <td>{$vo['user']['username']}</td>
+                    <td>{$vo['user']['realname']}</td>
                     <td>{$vo['user']['sex'] == 1 ? '男' : '女'}</td>
                     <td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['user']['id']))}"/></td>
                     <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>