welcome.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. {template 'common/header'}
  2. <div class="welcome-container" id="js-home-welcome" ng-controller="WelcomeCtrl" ng-cloak>
  3. {if permission_check_account_user('statistics_fans', false)}
  4. <div class="panel we7-panel account-stat">
  5. <div class="panel-heading">
  6. <h4>今日/昨日</h4>
  7. </div>
  8. <div class="panel-body we7-padding-vertical">
  9. <div class="col-sm-3 text-center">
  10. <div class="title">新关注</div>
  11. <div>
  12. <span class="today" ng-init="0" ng-bind="fans_kpi.today.new"></span>
  13. <span class="pipe">/</span>
  14. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.new"></span>
  15. </div>
  16. </div>
  17. <div class="col-sm-3 text-center">
  18. <div class="title">取消关注</div>
  19. <div>
  20. <span class="today" ng-init="0" ng-bind="fans_kpi.today.cancel"></span>
  21. <span class="pipe">/</span>
  22. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.cancel"></span>
  23. </div>
  24. </div>
  25. <div class="col-sm-3 text-center">
  26. <div class="title">净增关注</div>
  27. <div>
  28. <span class="today" ng-init="0" ng-bind="fans_kpi.today.jing_num"></span>
  29. <span class="pipe">/</span>
  30. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.jing_num"></span>
  31. </div>
  32. </div>
  33. <div class="col-sm-3 text-center">
  34. <div class="title">累计关注</div>
  35. <div>
  36. <span class="today" ng-init="0" ng-bind="fans_kpi.all"></span>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. {/if}
  42. <!-- 公告 start -->
  43. <div class="panel we7-panel">
  44. <div class="panel-heading">
  45. <h4>公告</h4>
  46. <ul class="nav nav-tabs" role="tablist">
  47. <li role="presentation" class="active">
  48. <a href="#notice" aria-controls="notice" role="tab" data-toggle="tab" >系统公告</a>
  49. </li>
  50. </ul>
  51. <a href="./index.php?c=article&a=notice-show" class="color-default more">更多</a>
  52. {if permission_check_account_user('see_notice_post')}<a href="./index.php?c=article&a=notice&do=post" class="color-default more">+新建</a>{/if}
  53. </div>
  54. <div class="panel-body">
  55. <div class="tab-content" >
  56. <div class="tab-pane active" id="notice">
  57. <ul class="list-group notice-statistics" >
  58. <li class="list-group-item" ng-repeat="notice in notices" ng-if="notices && notices.length">
  59. <a ng-href="{{notice.url}}" class="text-over" target="_blank" ng-style="{'color': notice.style.color, 'font-weight': notice.style.bold ? 'bold' : 'normal'}" ng-bind="notice.title"></a>
  60. <span class="pull-right color-gray" ng-bind="notice.createtime"></span>
  61. </li>
  62. <div class="we7-empty-block" ng-if="!notices.length">
  63. 暂无公告
  64. </div>
  65. </ul>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <!-- 公告 end -->
  71. </div>
  72. <script>
  73. angular.module('homeApp').value('config', {
  74. family: "{php echo IMS_FAMILY}",
  75. notices: {php echo !empty($notices) ? json_encode($notices) : 'null'},
  76. 'apiLink': '//api.w7.cc',
  77. });
  78. angular.bootstrap($('#js-home-welcome'), ['homeApp']);
  79. $(function(){
  80. $('[data-toggle="tooltip"]').tooltip();
  81. var $topic = $('.welcome-container .notice .menu .topic');
  82. var $ul = $('.welcome-container .notice ul');
  83. $topic.mouseover(function(){
  84. var $this = $(this);
  85. var $index = $this.index();
  86. if ($this.is('.we7notice')) {
  87. $this.parent().prev().hide();
  88. } else {
  89. $this.parent().prev().show();
  90. }
  91. $topic.removeClass('active');
  92. $this.addClass('active');
  93. $ul.removeClass('active');
  94. $ul.eq($index).addClass('active');
  95. })
  96. })
  97. </script>
  98. {template 'common/footer'}