statistics.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. <li class="active">小程序访问统计</li>
  4. </ul>
  5. <div id="js-statistics-display" ng-controller="StatisticeCtrl" ng-cloak>
  6. <div class="welcome-container">
  7. <div class="panel we7-panel wxapp-target">
  8. <div class="panel-heading">昨日概况</div>
  9. <div class="panel-body we7-padding-vertical">
  10. <div class="col-sm-3 text-center">
  11. <div class="title">打开次数</div>
  12. <div>
  13. <span class="today">{$yesterday_stat['session_cnt']}</span>
  14. </div>
  15. </div>
  16. <div class="col-sm-3 text-center">
  17. <div class="title">访问次数/人数</div>
  18. <div>
  19. <span class="today">{$yesterday_stat['visit_pv']}</span><span class="today">/ {$yesterday_stat['visit_uv']}</span>
  20. </div>
  21. </div>
  22. <div class="col-sm-3 text-center">
  23. <div class="title">新访问用户数</div>
  24. <div>
  25. <span class="today">{$yesterday_stat['visit_uv_new']}</span>
  26. </div>
  27. </div>
  28. <div class="col-sm-3 text-center">
  29. <div class="title">人均/次均停留时长(秒)</div>
  30. <div>
  31. <span class="today">{php echo round($yesterday_stat['stay_time_uv'],2);}</span>
  32. <span class="today">/ {php echo round($yesterday_stat['stay_time_session'],2);}</span>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="panel we7-panel">
  38. <div class="panel-heading tab">
  39. <a href="javascript:;">关键指标</a>
  40. <a href="javascript:;" ng-class="{'active': visitDivideType == 'session_cnt'}" ng-click="changeDivideType('session_cnt')">打开次数</a>
  41. <a href="javascript:;" ng-class="{'active': visitDivideType == 'visit_pv'}" ng-click="changeDivideType('visit_pv')">访问次数</a>
  42. <a href="javascript:;" ng-class="{'active': visitDivideType == 'visit_uv'}" ng-click="changeDivideType('visit_uv')">访问人数</a>
  43. <a href="javascript:;" ng-class="{'active': visitDivideType == 'visit_uv_new'}" ng-click="changeDivideType('visit_uv_new')">新用户数</a>
  44. <a href="javascript:;" ng-class="{'active': visitDivideType == 'stay_time_uv'}" ng-click="changeDivideType('stay_time_uv')">人均停留</a>
  45. <a href="javascript:;" ng-class="{'active': visitDivideType == 'stay_time_session'}" ng-click="changeDivideType('stay_time_session')">次均停留</a>
  46. </div>
  47. <div class="panel-body data-view">
  48. <div class="tab-bar-time clearfrix">
  49. <span class="we7-margin-right">时间</span>
  50. <div class="btn-group" role="group">
  51. <button type="button" class="btn btn-default" ng-class="{'active': visitTimeType == 'week'}" ng-click="getVisitApi('week')">周统计</button>
  52. <button type="button" class="btn btn-default" ng-class="{'active': visitTimeType == 'month'}" ng-click="getVisitApi('month')">月统计</button>
  53. <div class="btn-group" role="group">
  54. <button class="btn btn-default daterange daterange-date" we7-date-range-picker ng-model="dateRange"><span>{{dateRange.startDate}} </span>至<span> {{dateRange.endDate}}</span> <i class="fa fa-calendar"></i></button>
  55. </div>
  56. </div>
  57. </div>
  58. <div class="col-sm-12" id="chart-line" style="height:500px"></div>
  59. </div>
  60. </div>
  61. </div>
  62. <script>
  63. require(['daterangepicker'], function() {
  64. angular.module('wxApp').value('config', {
  65. 'links': {
  66. 'visitApi': "{php echo url('wxapp/statistics/get_visit_api')}",
  67. },
  68. });
  69. angular.bootstrap($('#js-statistics-display'), ['wxApp']);
  70. })
  71. </script>
  72. {template 'common/footer'}