人人商城

welcome.tpl.php 3.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
  2. <div class="welcome-container" id="js-home-welcome" ng-controller="WelcomeCtrl" ng-cloak>
  3. <div class="welcome-container">
  4. <?php if(permission_check_account_user('statistics_fans', false)) { ?>
  5. <div class="panel we7-panel account-stat">
  6. <div class="panel-heading">
  7. 今日关键指标/昨日关键指标
  8. </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" ng-init="0" ng-bind="fans_kpi.today.new"></span>
  14. <span class="pipe">/</span>
  15. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.new"></span>
  16. </div>
  17. </div>
  18. <div class="col-sm-3 text-center">
  19. <div class="title">取消关注</div>
  20. <div>
  21. <span class="today" ng-init="0" ng-bind="fans_kpi.today.cancel"></span>
  22. <span class="pipe">/</span>
  23. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.cancel"></span>
  24. </div>
  25. </div>
  26. <div class="col-sm-3 text-center">
  27. <div class="title">净增关注</div>
  28. <div>
  29. <span class="today" ng-init="0" ng-bind="fans_kpi.today.jing_num"></span>
  30. <span class="pipe">/</span>
  31. <span class="yesterday" ng-init="0" ng-bind="fans_kpi.yesterday.jing_num"></span>
  32. </div>
  33. </div>
  34. <div class="col-sm-3 text-center">
  35. <div class="title">累计关注</div>
  36. <div>
  37. <span class="today" ng-init="0" ng-bind="fans_kpi.today.cumulate"></span>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <?php } ?>
  43. <div class="panel we7-panel notice notice-tab">
  44. <div class="panel-heading">
  45. <?php if(permission_check_account_user('see_notice_post')) { ?><a href="./index.php?c=article&a=notice&do=post" class="color-default pull-right we7-margin-left">+新建</a><?php } ?>
  46. <a href="./index.php?c=article&a=notice-show" class="color-default pull-right">更多</a>
  47. <div class="menu">
  48. <span class="topic active notice">公告</span>
  49. </div>
  50. </div>
  51. <ul class="list-group active">
  52. <li class="list-group-item" ng-repeat="notice in notices" ng-if="notices">
  53. <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>
  54. <span class="pull-right color-gray" ng-bind="notice.createtime"></span>
  55. </li>
  56. <li class="list-group-item text-center" ng-if="!notices">
  57. <span>暂无数据</span>
  58. </li>
  59. </ul>
  60. </div>
  61. </div>
  62. </div>
  63. <script>
  64. angular.module('homeApp').value('config', {
  65. notices: <?php echo !empty($notices) ? json_encode($notices) : 'null'?>,
  66. });
  67. angular.bootstrap($('#js-home-welcome'), ['homeApp']);
  68. $(function(){
  69. $('[data-toggle="tooltip"]').tooltip();
  70. var $topic = $('.welcome-container .notice .menu .topic');
  71. var $ul = $('.welcome-container .notice ul');
  72. $topic.mouseover(function(){
  73. var $this = $(this);
  74. var $index = $this.index();
  75. if ($this.is('.we7notice')) {
  76. $this.parent().prev().hide();
  77. } else {
  78. $this.parent().prev().show();
  79. }
  80. $topic.removeClass('active');
  81. $this.addClass('active');
  82. $ul.removeClass('active');
  83. $ul.eq($index).addClass('active');
  84. })
  85. })
  86. </script>
  87. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>