人人商城

display.html 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. <li class="active"><a href="{url 'statistics/app'}">访问统计信息</a></li>
  4. <li><a href="{url 'statistics/setting'}">访问统计设置</a></li>
  5. </ul>
  6. <div class="api" id="js-statistics-app-display" ng-controller="HorizontalBarCtrl" ng-cloak>
  7. <div class="panel we7-panel api-target">
  8. <div class="panel-heading">今日/昨日关键指标</div>
  9. <div class="panel-body we7-padding-vertical">
  10. <div class="col-sm-4 text-center">
  11. <div class="title">应用总访问数</div>
  12. <div>
  13. <span class="today">{$today_module_api['visit_sum']}</span>
  14. <span class="yesterday">/ {$yesterday_module_api['visit_sum']}</span>
  15. </div>
  16. </div>
  17. <div class="col-sm-4 text-center">
  18. <div class="title">应用平均访问数</div>
  19. <div>
  20. <span class="today">{$today_module_api['visit_avg']}</span>
  21. <span class="yesterday">/ {$yesterday_module_api['visit_avg']}</span>
  22. </div>
  23. </div>
  24. <div class="col-sm-4 text-center">
  25. <div class="title">应用最高访问数</div>
  26. <div>
  27. <span class="today">{$today_module_api['visit_highest']}</span>
  28. <span class="yesterday">/ {$yesterday_module_api['visit_highest']}</span>
  29. </div>
  30. </div>
  31. </div>
  32. </div>
  33. <div class="we7-margin-vertical color-dark font-lg">公众号API访问统计</div>
  34. <div class="panel we7-panel">
  35. <div class="panel-heading tab">
  36. <a href="javascript:;">关键指标详解</a>
  37. <a href="javascript:;" ng-class="{'active': accountDivideType == 'bysum'}" ng-click="changeDivideType('account', 'bysum')">公众号总访问数</a>
  38. <a href="javascript:;" ng-class="{'active': accountDivideType == 'byavg'}" ng-click="changeDivideType('account', 'byavg')">公众号平均访问数</a>
  39. <a href="javascript:;" ng-class="{'active': accountDivideType == 'byhighest'}" ng-click="changeDivideType('account', 'byhighest')">公众号最高访问数</a>
  40. </div>
  41. <div class="panel-body data-view">
  42. <div class="tab-bar-time clearfrix">
  43. <span class="we7-margin-right">时间</span>
  44. <div class="btn-group" role="group">
  45. <button type="button" class="btn btn-default" ng-class="{'active': accountTimeType == 'today'}" ng-click="getModuleApi('account', 'today')">今日统计</button>
  46. <button type="button" class="btn btn-default" ng-class="{'active': accountTimeType == 'week'}" ng-click="getModuleApi('account', 'week')">周统计</button>
  47. <button type="button" class="btn btn-default" ng-class="{'active': accountTimeType == 'month'}" ng-click="getModuleApi('account', 'month')">月统计</button>
  48. <div class="btn-group" role="group">
  49. <button class="btn btn-default daterange daterange-date" we7-date-range-picker ng-model="accountDateRange"><span>{{accountDateRange.startDate}} </span>至<span> {{accountDateRange.endDate}}</span> <i class="fa fa-calendar"></i></button>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="col-sm-12" id="chart-line" style="height:500px"></div>
  54. </div>
  55. </div>
  56. <div class="we7-margin-vertical color-dark font-lg">应用模块API统计</div>
  57. <div class="panel we7-panel">
  58. <div class="panel-heading tab">
  59. <a href="javascript:;">关键指标详解</a>
  60. <a href="javascript:;" ng-class="{'active': moduleDivideType == 'bysum'}" ng-click="changeDivideType('module', 'bysum')">总访问数</a>
  61. <a href="javascript:;" ng-class="{'active': moduleDivideType == 'byavg'}" ng-click="changeDivideType('module', 'byavg')">平均访问数</a>
  62. <a href="javascript:;" ng-class="{'active': moduleDivideType == 'byhighest'}" ng-click="changeDivideType('module', 'byhighest')">最高访问数</a>
  63. </div>
  64. <div class="panel-body data-view">
  65. <div class="tab-bar-time clearfrix">
  66. <span class="we7-margin-right">时间</span>
  67. <div class="btn-group" role="group">
  68. <button type="button" class="btn btn-default" ng-class="{'active': moduleTimeType == 'today'}" ng-click="getModuleApi('module', 'today')">今日统计</button>
  69. <button type="button" class="btn btn-default" ng-class="{'active': moduleTimeType == 'week'}" ng-click="getModuleApi('module', 'week')">周统计</button>
  70. <button type="button" class="btn btn-default" ng-class="{'active': moduleTimeType == 'month'}" ng-click="getModuleApi('module', 'month')">月统计</button>
  71. <div class="btn-group" role="group">
  72. <button class="btn btn-default daterange daterange-date" we7-date-range-picker ng-model="moduleDateRange"><span>{{moduleDateRange.startDate}} </span>至<span> {{moduleDateRange.endDate}}</span> <i class="fa fa-calendar"></i></button>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="col-sm-12">
  77. <div id="chart-horizontal-bar" style="height:1000px"></div>
  78. </div>
  79. <div class="col-sm-12">
  80. {if user_is_founder($_W['uid']) && !user_is_vice_founder()}
  81. <div class="we7-margin-vertical text-right">
  82. <a href="javascript:;" class="color-default" ng-click="changeStatus()">
  83. 解决访问统计没数据的方法 <span class="wi wi-angle-up"></span>
  84. </a>
  85. </div>
  86. <div class="distribution-steps" ng-show = "show==true">
  87. <div class="steps-container">
  88. <div>
  89. <div class="num">1</div>
  90. <div class="title">
  91. <span class="wi wi-warning-sign"></span>应用没有统计数据
  92. </div>
  93. <div class="content">
  94. 没有应用的统计数据,是因为模块内没有统计数据的代码,需要复制第2步的代码到对应的模块内。然后联系应用模块开发者更新提交代码,完成后即可生成统计数据。
  95. </div>
  96. </div>
  97. <div>
  98. <div class="num">2</div>
  99. <div class="title">
  100. <span class="wi wi-code"></span>复制代码
  101. </div>
  102. <div class="content">
  103. <textarea class="form-control code-container we7-margin-bottom-sm" ng-model="code">
  104. </textarea>
  105. <div><a href="javascript:;" id="copy-1" class="btn btn-primary" clipboard supported="supported" text="code"
  106. on-copied="success(1);">复制代码</a></div>
  107. </div>
  108. </div>
  109. <div>
  110. <div class="num">3</div>
  111. <div class="title">
  112. <span class="wi wi-help"></span>联系开发者
  113. </div>
  114. <div class="content">
  115. 找到没有统计数据的应用,联系<span class="color-default">应用模块的开发者</span>,让开发者将代码更新提交后,则可生成模块的统计数据。
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. {/if}
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. <script>
  126. require(['daterangepicker'], function() {
  127. angular.module('statisticsApp').value('config', {
  128. 'links': {
  129. 'accountApi': "{php echo url('statistics/app/get_account_api')}",
  130. 'moduleApi': "{php echo url('statistics/app/get_module_api')}",
  131. },
  132. });
  133. angular.bootstrap($('#js-statistics-app-display'), ['statisticsApp']);
  134. })
  135. </script>
  136. {template 'common/footer'}