Browse Source

sunguidong

zhangguidong 2 years ago
parent
commit
5390b07748

+ 3 - 1
application/store/controller/Activity.php

@@ -42,7 +42,9 @@ class Activity extends Controller
         foreach ($data as &$v){
             //1活动未开始、2活动报名中、3报名已满、4报名结束、5活动进中、6活动结束
            av_status($v['id']);
-
+           $v['baoming'] = Db::name('store_activity_sing')->where('a_id',$v['id'])->count();
+           $v['sing'] = Db::name('store_activity_sing')->where('a_id',$v['id'])->where('is_sing','=',1)->count();
+           $v['pre']=($v['baoming']/$v['sing'])*100;
         }
     }
 

+ 0 - 3
application/store/view/activity/detail.html

@@ -10,20 +10,17 @@
             <th class='text-left nowrap'>用户名</th>
             <th class="text-left nowrap">是否签到</th>
             <th class="text-left nowrap">报名时间</th>
-
         </tr>
         </thead>
         {/notempty}
         <tbody>
         {foreach $list as $key=>$vo}
         <tr>
-
             <td class='text-left nowrap'>{$vo.nickname|default=''}</td>
             <td class='text-left nowrap'>
                 {eq name='vo.is_sing' value='0'}未签到{/eq}
                 {eq name='vo.is_sing' value='1'}已签到{/eq}
             </td>
-
             <td class='text-left nowrap'>{$vo.create_at}</td>
         </tr>
         {/foreach}

+ 8 - 0
application/store/view/activity/index.html

@@ -20,6 +20,9 @@
             <th class='text-left nowrap'>活动标题</th>
             <th class='text-left nowrap'>展示图片</th>
             <th class='text-left nowrap'>活动状态</th>
+            <th class='text-left nowrap'>报名人数</th>
+            <th class='text-left nowrap'>签到人数</th>
+            <th class='text-left nowrap'>到场比例</th>
             <th class='text-left nowrap'>创建时间</th>
 
             <th>操作</th>
@@ -42,6 +45,11 @@
                 {eq name='vo.status' value='5'}活动进中{/eq}
                 {eq name='vo.status' value='6'}活动结束{/eq}
             </td>
+            <td class='text-left nowrap'>{$vo.baoming|default=''}</td>
+            <td class='text-left nowrap'>{$vo.sing|default=''}</td>
+            <td class='text-left nowrap'>{$vo.pre|default=''}</td>
+
+
             <td class='text-left nowrap'>{$vo.create_at|format_datetime}</td>
             <td class='text-left nowrap'>
                 {if auth("store/activity/edit")}