人人商城

index.html 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. {template '_header'}
  2. <style type='text/css'>
  3. .feed-activity-list {
  4. width: 100%;
  5. overflow: hidden;
  6. padding-top: 10px;
  7. padding-bottom: 10px;
  8. border-bottom: 1px solid #f2f2f2
  9. }
  10. .feed-element {
  11. float: left;
  12. cursor: pointer;
  13. width: 400px;
  14. padding: 10px;
  15. margin: 0;
  16. margin-right: 10px;
  17. margin-left: 10px;
  18. border: none;
  19. }
  20. .feed-element::after {
  21. display: none
  22. }
  23. .feed-element .title {
  24. font-size: 14px;
  25. font-weight: bold;
  26. height: 32px;
  27. margin-top: 10px;
  28. }
  29. .feed-activity-list .feed-element {
  30. border: none;
  31. border-right: 1px solid #f2f2f2;
  32. }
  33. .feed-element img.img-circle,
  34. .dropdown-messages-box img.img-circle {
  35. width: 60px;
  36. height: 60px;
  37. border-radius: 10px;
  38. }
  39. .media-body {
  40. margin-top: 3px;
  41. }
  42. </style>
  43. <div class="page-heading">
  44. {if $permPlugin || $_W['role'] == 'founder'}
  45. <span class='pull-right' style="display: none;">
  46. <a class='btn btn-default btn-sm' href="{php echo webUrl('grant')}">授权应用中心</a>
  47. </span>
  48. {/if}
  49. <h2>我的应用</h2>
  50. </div>
  51. <div class='panel panel-default' style='border:none;'>
  52. {if $permPlugin || $_W['role'] == 'founder'}
  53. {if !empty($setting['adv'])}
  54. <a href="{php echo webUrl('grant')}">
  55. <img src="{php echo tomedia($setting['adv'])}" width="100%" alt="授权应用中心">
  56. </a>
  57. {/if}
  58. {/if}
  59. {if p("grant") && !empty($pluginsetting['adv'])}
  60. <a href="{php echo webUrl('plugingrant')}">
  61. <img src="{php echo tomedia($pluginsetting['adv'])}" width="100%" alt="授权应用中心">
  62. </a>
  63. {/if}
  64. {loop $category $ck $cv}
  65. {if count($cv['plugins'])<=0}{php continue;}{/if}
  66. <div class="panel-heading" style='background:none;border:none;'>
  67. {$cv['name']}
  68. </div>
  69. <div class="feed-activity-list">
  70. {loop $cv['plugins'] $plugin}
  71. {if com_run('perm::check_plugin',$plugin['identity'])}
  72. {ifp $plugin['identity']}
  73. <div class="feed-element" onclick="location.href='{php echo webUrl($plugin['identity'])}'">
  74. <span class="pull-left" style="position: relative;">
  75. <img src="{php echo empty($plugin['thumb'])?'../addons/ewei_shopv2/static/images/plugin.png': tomedia($plugin['thumb'])}" class="img-circle" alt="image">
  76. </span>
  77. <div class="media-body ">
  78. <span class="title">{$plugin['name']}</span>
  79. {if $_W['role'] != 'founder' && $plugin['isgrant']>0}
  80. <Script Language="JavaScript">
  81. <!-- Begin
  82. var timedate= new Date({$plugin['permendtime']}*1000);
  83. var times="研究生考试";
  84. var now = new Date();
  85. var date = timedate.getTime() - now.getTime();
  86. var time = Math.floor(date / (1000 * 60 * 60 * 24));
  87. if (time >= 0) {
  88. if(time <=30){
  89. document.write("授权剩余:<span style='font-size:12px;color:#fff;background: #ed5565 ;padding:2px 5px;display:inline-block;border-radius: 3px;'>"+time +"天</span>");
  90. }else{
  91. document.write("授权剩余:<span style='font-size:12px;color:#fff;background: #3c9be1 ;padding:2px 5px;display:inline-block;border-radius: 3px;'>"+time +"天</span>");
  92. }
  93. }else{
  94. document.write("授权已过期");
  95. };
  96. // End -->
  97. </Script>
  98. {elseif $_W['role'] != 'founder' && $plugin['isplugingrant']>0}
  99. <script type="text/javascript">
  100. var timedate= new Date({$plugin['permendtime']}*1000);
  101. var month = {$plugin['month']};
  102. var isperm = {$plugin['isperm']};
  103. var now = new Date();
  104. var date = timedate.getTime() - now.getTime();
  105. var time = Math.floor(date / (1000 * 60 * 60 * 24 * 30));
  106. if(month==0){
  107. if(isperm==0){
  108. document.write("授权已过期");
  109. }
  110. }else{
  111. if(time >= 0){
  112. if(time <=1){
  113. document.write("授权剩余:<span style='font-size:12px;color:#fff;background: #ed5565 ;padding:2px 5px;display:inline-block;border-radius: 3px;'>"+1 +"月</span>");
  114. }else{
  115. document.write("授权剩余:<span style='font-size:12px;color:#fff;background: #3c9be1 ;padding:2px 5px;display:inline-block;border-radius: 3px;'>"+time +"月</span>");
  116. }
  117. }
  118. };
  119. </script>
  120. {/if}
  121. <br>
  122. <small class="text-muted">{$plugin['desc']}</small>
  123. </div>
  124. </div>
  125. {/if}
  126. {/if}
  127. {/loop}
  128. </div>
  129. {/loop}
  130. </div>
  131. <script>
  132. $(document).ready(function () {
  133. $('.feed-activity-list,.plugin_tabs').each(function(){
  134. if($(this).children().length<=0){
  135. $(this).prev().remove();
  136. $(this).remove();
  137. }
  138. });
  139. })
  140. </script>
  141. {template '_footer'}