Bläddra i källkod

Merge branch 'bonus_manager' of 121.43.114.153:/home/git/repositories/shopnc into bonus_manager

stanley-king 7 år sedan
förälder
incheckning
bf813f0a1b

+ 16 - 0
admin/control/stat_daily.php

@@ -27,6 +27,22 @@ class stat_dailyControl extends SystemControl
     {
         return ['日期','可用金额','可用个数','今日发送金额','今日未领金额','今日发送个数','今日领取个数','红包支付金额','红包转发金额','红包转发次数','新增用户','总用户','日活','周活','月活','订单总数','订单总额','客单价'];
     }
+
+    public function interactive_listOp()
+    {
+        Tpl::showpage('stat.interactive.list');
+    }
+
+    public function interactive_goodsOp()
+    {
+        Tpl::showpage('stat.interactive.goods');
+    }
+
+    public function interactive_specialOp()
+    {
+        Tpl::showpage('stat.interactive.special');
+    }
+
 }
 
 class daily_item

+ 8 - 64
admin/templates/default/stat.daily.list.php

@@ -6,6 +6,12 @@
     <div class="fixed-bar">
         <div class="item-title">
             <h3>日常统计</h3>
+            <ul class="tab-base">
+                <li><a href="javascript:void(0)" class="current"><span>日常统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_list"><span>交互行为统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_goods"><span>商品统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_special"><span>专题统计</span></a></li>
+            </ul>
         </div>
     </div>
     <!— 帮助 —>
@@ -63,72 +69,10 @@
             <tfoot>
             <tr class="tfoot">
                 <td colspan="16">
-                    <div class="pagination"><?php echo $output['page'];?> </div></td>
+                    <div class="pagination"><?php echo $output['page']; ?> </div>
+                </td>
             </tr>
             </tfoot>
         </table>
     </form>
-
-    <div class="label">
-        <div id="label" style="width: 800px;height:400px;"></div>
-        <span class="close_btn"></span>
-    </div>
-
-    <script src="https://cdn.bootcss.com/echarts/3.6.2/echarts.min.js"></script>
-    <script type="text/javascript">
-        $(function(){
-           var creatLabel =  function(tableName) {
-               var myChart = echarts.init(document.getElementById('label'));
-               // 指定图表的配置项和数据
-               var option = {
-                   title: {
-                       text: tableName
-                   },
-                   legend: {
-                       data:['红包数']
-                   },
-                   series : [
-                       {
-                           name: '访问来源',
-                           type: 'pie',
-                           radius: '55%',
-                           data:[
-                               {value:235, name:'可用红包金额235'},
-                               {value:274, name:'可用红包个数274'},
-                               {value:310, name:'今日发送所有红包金额31000'},
-                               {value:335, name:'当日剩余红包总额335'},
-                               {value:400, name:'type表中红包条数400'}
-                           ],
-                           hoverAnimation:true
-                       }
-                   ]
-               };
-               // 使用刚指定的配置项和数据显示图表。
-               myChart.setOption(option);
-           };
-            $('.hover td').on('click',function(){
-                var getType = $(this).attr('data-getType');
-                if(!getType) {return;}
-                switch (getType) {
-                    case "bonus": {
-                        creatLabel('红包统计');
-                        break;
-                    }
-                    case "liveness" :{
-
-                        creatLabel('活跃度统计');
-                        break;
-                    }
-                    case "order" : {
-                        creatLabel('订单统计');
-                        break;
-                    }
-                }
-                $('.label').css('display','block');
-            });
-            $('.close_btn').on('click',function(){
-                $('.label').css('display','none');
-            })
-        });
-    </script>
 </div>

+ 76 - 0
admin/templates/default/stat.interactive.goods.php

@@ -0,0 +1,76 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+
+<!—商品统计分析—>
+<div class="page">
+    <!— 页面导航 —>
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>商品统计</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=stat_daily&op=index"><span>日常统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_list"><span>交互行为统计</span></a></li>
+                <li><a href="javascript:void(0)" class="current"><span>商品统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_special"><span>专题统计</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <!— 帮助 —>
+    <table class="table tb-type2" id="prompt">
+        <tbody>
+        <tr class="space odd">
+            <th colspan="12" class="nobg">
+                <div class="title nomargin">
+                    <h5><?php echo $lang['nc_prompts']; ?></h5>
+                    <span class="arrow"></span></div>
+            </th>
+        </tr>
+        <tr>
+            <td>
+                <ul>
+                    <li>可以查询用户点击商品次数相关统计信息</li>
+                </ul>
+            </td>
+        </tr>
+        </tbody>
+    </table>
+
+    <form method="post">
+        <table class="table tb-type2">
+            <thead>
+            <tr class="space">
+                <th colspan="15" class="nobg"><?php echo $lang['nc_list']; ?></th>
+            </tr>
+            <tr class="thead">
+                <?php
+                $colomns = $output['colomns'];
+                foreach ($colomns as $name) {
+                    echo "<th class=\"w60 align-left\">{$name}</th>";
+                }
+                ?>
+            </tr>
+            </thead>
+            <tbody>
+            <?php
+            $dailies = $output['dailies'];
+            foreach ($dailies as $stat)
+            {
+                $item = new daily_item($stat);
+                $fields = $item->fields();
+
+                echo '<tr class="hover">';
+                foreach ($fields as $field) {
+                    echo  "<td class=\"w60 align-left\">{$field}</td>";
+                }
+                echo '</tr>';
+            }
+            ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="16">
+                    <div class="pagination"><?php echo $output['page'];?> </div></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>

+ 76 - 0
admin/templates/default/stat.interactive.list.php

@@ -0,0 +1,76 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+
+<!—交互行为统计—>
+<div class="page">
+    <!— 页面导航 —>
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>交互行为统计</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=stat_daily&op=index"><span>日常统计</span></a></li>
+                <li><a href="javascript:void(0)" class="current"><span>交互行为统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_goods"><span>商品统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_special"><span>专题统计</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <!— 帮助 —>
+    <table class="table tb-type2" id="prompt">
+        <tbody>
+        <tr class="space odd">
+            <th colspan="12" class="nobg">
+                <div class="title nomargin">
+                    <h5><?php echo $lang['nc_prompts']; ?></h5>
+                    <span class="arrow"></span></div>
+            </th>
+        </tr>
+        <tr>
+            <td>
+                <ul>
+                    <li>可以查询用户交互行为相关统计信息</li>
+                </ul>
+            </td>
+        </tr>
+        </tbody>
+    </table>
+
+    <form method="post">
+        <table class="table tb-type2">
+            <thead>
+            <tr class="space">
+                <th colspan="15" class="nobg"><?php echo $lang['nc_list']; ?></th>
+            </tr>
+            <tr class="thead">
+                <?php
+                $colomns = $output['colomns'];
+                foreach ($colomns as $name) {
+                    echo "<th class=\"w60 align-left\">{$name}</th>";
+                }
+                ?>
+            </tr>
+            </thead>
+            <tbody>
+            <?php
+            $dailies = $output['dailies'];
+            foreach ($dailies as $stat)
+            {
+                $item = new daily_item($stat);
+                $fields = $item->fields();
+
+                echo '<tr class="hover">';
+                foreach ($fields as $field) {
+                    echo  "<td class=\"w60 align-left\">{$field}</td>";
+                }
+                echo '</tr>';
+            }
+            ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="16">
+                    <div class="pagination"><?php echo $output['page'];?> </div></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>

+ 76 - 0
admin/templates/default/stat.interactive.special.php

@@ -0,0 +1,76 @@
+<?php defined('InShopNC') or exit('Access Invalid!'); ?>
+
+<!—专题统计分析—>
+<div class="page">
+    <!— 页面导航 —>
+    <div class="fixed-bar">
+        <div class="item-title">
+            <h3>专题统计</h3>
+            <ul class="tab-base">
+                <li><a href="index.php?act=stat_daily&op=index"><span>日常统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_list"><span>交互行为统计</span></a></li>
+                <li><a href="index.php?act=stat_daily&op=interactive_goods"><span>商品统计</span></a></li>
+                <li><a href="javascript:void(0)" class="current"><span>专题统计</span></a></li>
+            </ul>
+        </div>
+    </div>
+    <!— 帮助 —>
+    <table class="table tb-type2" id="prompt">
+        <tbody>
+        <tr class="space odd">
+            <th colspan="12" class="nobg">
+                <div class="title nomargin">
+                    <h5><?php echo $lang['nc_prompts']; ?></h5>
+                    <span class="arrow"></span></div>
+            </th>
+        </tr>
+        <tr>
+            <td>
+                <ul>
+                    <li>可以查询用户点击专题次数相关统计信息</li>
+                </ul>
+            </td>
+        </tr>
+        </tbody>
+    </table>
+
+    <form method="post">
+        <table class="table tb-type2">
+            <thead>
+            <tr class="space">
+                <th colspan="15" class="nobg"><?php echo $lang['nc_list']; ?></th>
+            </tr>
+            <tr class="thead">
+                <?php
+                $colomns = $output['colomns'];
+                foreach ($colomns as $name) {
+                    echo "<th class=\"w60 align-left\">{$name}</th>";
+                }
+                ?>
+            </tr>
+            </thead>
+            <tbody>
+            <?php
+            $dailies = $output['dailies'];
+            foreach ($dailies as $stat)
+            {
+                $item = new daily_item($stat);
+                $fields = $item->fields();
+
+                echo '<tr class="hover">';
+                foreach ($fields as $field) {
+                    echo  "<td class=\"w60 align-left\">{$field}</td>";
+                }
+                echo '</tr>';
+            }
+            ?>
+            </tbody>
+            <tfoot>
+            <tr class="tfoot">
+                <td colspan="16">
+                    <div class="pagination"><?php echo $output['page'];?> </div></td>
+            </tr>
+            </tfoot>
+        </table>
+    </form>
+</div>