site-current-account.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. {template 'common/header'}
  2. <ul class="we7-page-tab">
  3. {loop $active_sub_permission $active_menu}
  4. {if permission_check_account_user($active_menu['permission_name'], false) && (empty($active_menu['is_display']) || is_array($active_menu['is_display']) && in_array($_W['account']['type'], $active_menu['is_display']))}
  5. <li {if $action == $active_menu['active']}class="active"{/if}><a href="{php echo $active_menu['url'] . 'version_id=' . $_GPC['version_id']}">{$active_menu['title']}</a></li>
  6. {/if}
  7. {/loop}
  8. </ul>
  9. <div class="api" id="js-statistics-current-account" ng-controller="CurrentAccountCtrl" ng-cloak>
  10. <div class="panel we7-panel api-target">
  11. <div class="panel-heading">今日/昨日关键指标</div>
  12. <div class="panel-body we7-padding-vertical">
  13. <div class="col-sm-4 text-center">
  14. <div class="title">总访问数</div>
  15. <div>
  16. <span class="today">{php echo $today + 1;}</span>
  17. <span class="yesterday">/ {$yesterday}</span>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <div class="panel we7-panel">
  23. <div class="panel-body data-view">
  24. <div class="tab-bar-time clearfrix">
  25. <span class="we7-margin-right">时间</span>
  26. <div class="btn-group" role="group">
  27. <button type="button" class="btn btn-default" ng-class="{'active': accountTimeType == 'week'}" ng-click="getModuleApi('week')">周统计</button>
  28. <button type="button" class="btn btn-default" ng-class="{'active': accountTimeType == 'month'}" ng-click="getModuleApi('month')">月统计</button>
  29. <div class="btn-group" role="group">
  30. <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>
  31. </div>
  32. </div>
  33. </div>
  34. <div class="col-sm-12" id="chart-line" style="height:500px"></div>
  35. </div>
  36. </div>
  37. </div>
  38. <script>
  39. require(['daterangepicker'], function() {
  40. angular.module('statisticsApp').value('config', {
  41. 'links': {
  42. 'accountApi': "{php echo url('statistics/site/get_account_api')}",
  43. },
  44. });
  45. angular.bootstrap($('#js-statistics-current-account'), ['statisticsApp']);
  46. })
  47. </script>
  48. {template 'common/footer'}