index.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <include file="public@header"/>
  2. </head>
  3. <style>
  4. .form-inline .form-control {
  5. margin: 10px 0;
  6. vertical-align: middle;
  7. }
  8. .form-inline span {
  9. margin-left: 5px;
  10. vertical-align: middle;
  11. }
  12. .margin-left-10 {
  13. margin-left: 10px;
  14. }
  15. .profile em {
  16. font-style: normal;
  17. color: #0b6cbc;
  18. }
  19. .profile em.red {
  20. color: red;
  21. }
  22. span.sort {
  23. color: red;
  24. display: inline-block;
  25. margin-left: 2px;
  26. vertical-align: middle;
  27. }
  28. td .info {
  29. display: flex;
  30. }
  31. td .info a {
  32. position: relative;
  33. display: inline-block;
  34. width: 30px;
  35. height: 30px;
  36. }
  37. td .info span {
  38. vertical-align: top;
  39. padding: 0px 4px;
  40. }
  41. td img.avatar, td img.sex {
  42. width: 30px;
  43. height: 30px;
  44. vertical-align: middle;
  45. border-radius: 100%;
  46. }
  47. td img.sex {
  48. position: absolute;
  49. z-index: 2;
  50. width: 12px;
  51. height: 12px;
  52. left: 0;
  53. right: 0;
  54. bottom: 0;
  55. margin: 0 auto;
  56. }
  57. .form .form-control {
  58. margin-bottom: 20px;
  59. }
  60. .form .control-label {
  61. text-align: center;
  62. }
  63. .form label {
  64. text-align: left;
  65. margin-bottom: 10px;
  66. margin-right: 10px;
  67. }
  68. .radio-inline+.radio-inline, .checkbox-inline+.checkbox-inline {
  69. margin-left: 0;
  70. }
  71. .table-actions span {
  72. margin-right: 10px;
  73. font-weight: bold;
  74. }
  75. .table-actions span em {
  76. font-style: normal;
  77. color: red;
  78. }
  79. .layui-layer-page .layui-layer-content {
  80. overflow: hidden !important;
  81. }
  82. span.expired {
  83. color: red;
  84. }
  85. .js-bootstrap-date {
  86. line-height: 22px !important;
  87. }
  88. .count-label {
  89. font-size: 16px;
  90. color: #0B90C4;
  91. margin-bottom: 10px;
  92. }
  93. span.count {
  94. color: #0B90C4;
  95. }
  96. </style>
  97. <body>
  98. <div class="wrap js-check-wrap">
  99. <ul class="nav nav-tabs">
  100. <li class="active"><a>渠道推广码列表</a>
  101. </li>
  102. <li><a href="{:url('admin/channels/add')}">添加渠道码</a></li>
  103. </ul>
  104. <form id="search" class="well form-inline margin-top-20" method="post" action="{:url('admin/channels/index')}">
  105. <span>渠道名称:</span>
  106. <input class="form-control" type="text" name="name" style="width: 150px;" value="{:input('request.name')}"
  107. placeholder="渠道名称关键词">
  108. <span>类型:</span>
  109. <select class="form-control" name="type" id="type" style="width: 150px;margin-right:10px;">
  110. <option value="1" <if condition="$params.type==1">selected</if>>广告推广</option>
  111. <option value="2" <if condition="$params.type==2">selected</if>>相亲卡</option>
  112. </select>
  113. <input id="sort" type="hidden" name="sort" value="{$params.sort?$params.sort: 1}">
  114. <input id="sortType" type="hidden" name="sort_type" value="{$params.sort_type?$params.sort_type: 'desc'}">
  115. <input type="submit" class="btn btn-primary margin-left-10 " value="搜索"/>
  116. <a class="btn btn-default margin-left-10" href="{:url('admin/channels/index')}">清空</a>
  117. </form>
  118. <form class="form-horizontal js-ajax-form margin-top-20" role="form">
  119. <div class="table-actions tags">
  120. <a class="count-label">累计推广:{$total}人</a>
  121. </div>
  122. <table class="table table-hover table-bordered">
  123. <thead>
  124. <tr>
  125. <th width="80">ID</th>
  126. <th width="150">渠道码名称</th>
  127. <th width="150">渠道码</th>
  128. <th width="150">授权链接</th>
  129. <th width="150">朋友圈链接</th>
  130. <th width="80">类型</th>
  131. <th width="100" align="center">总推广数</th>
  132. <th width="100">备注</th>
  133. <th width="80">状态</th>
  134. <th width="175">创建时间 <span class="row sort join-time" data-status="{$params.sort == 4? $params.sort_type : 'desc'}" onclick="sort(this,4)"><if condition="$params.sort eq 4 && $params.sort_type eq 'asc'">&#8595;<else>&#8593;</if></span></th>
  135. <th width="180">操作</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <foreach name="list" item="vo">
  140. <tr>
  141. <td>{$vo.id}</td>
  142. <td>
  143. {$vo.name}
  144. </td>
  145. <td>
  146. <a href="{$vo.qrcode}" target="_blank"><img class="qrcode" width="60px" height="60px" src="{$vo.qrcode}"></a>
  147. </td>
  148. <td >
  149. <a title="点击查看" target="_blank" style="text-decoration: underline" href='{$vo.share_url}'><span class="count">查看链接</span></a>
  150. </td>
  151. <td >
  152. <a title="点击查看" target="_blank" style="text-decoration: underline"><span class="count">{$vo.share_url1}</span></a>
  153. </td>
  154. <td>广告推广</td>
  155. <td >
  156. <a title="查看推广用户" style="text-decoration: underline" href='{:url("admin/channels/shares",array("share_id"=>$vo["id"]))}'><span class="count">{$vo['share_count']?$vo['share_count']:0}</span></a>
  157. </td>
  158. <td>
  159. {$vo.remark}
  160. </td>
  161. <td>
  162. <if condition="$vo['status'] eq 1">
  163. <span style="color: green;">有效</span>
  164. <else>
  165. <span style="color: red;">无效</span>
  166. </if>
  167. </td>
  168. <td>{$vo['create_time']}</td>
  169. <td>
  170. <a class="btn btn-xs btn-primary" href='{:url("admin/channels/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
  171. <a class="btn btn-xs btn-warning" href='{:url("admin/channels/shares",array("share_id"=>$vo["id"]))}'>推广统计</a>
  172. <a class="btn btn-xs btn-danger js-ajax-delete" href="{:url('admin/channels/delete',array('id'=>$vo['id']))}">{:lang('DELETE')}</a>
  173. </td>
  174. </foreach>
  175. </tbody>
  176. </table>
  177. <div class="pagination">{$page}</div>
  178. </form>
  179. </div>
  180. <script src="__STATIC__/js/admin.js"></script>
  181. <script src="__STATIC__/js/clipboard.min.js"></script>
  182. <script src="__STATIC__/js/layer/layer.js"></script>
  183. <script src="__STATIC__/js/position/position1.js" type="text/javascript"></script>
  184. <script src="__STATIC__/js/height/height.js" type="text/javascript"></script>
  185. <script>
  186. /**
  187. * 排序
  188. * @param type
  189. */
  190. function sort(ele,type){
  191. $("#sort").val(type);
  192. var status = $(ele).attr('data-status');
  193. $("#sortType").val(status=='desc'? 'asc': 'desc');
  194. $(ele).html(status == 'desc'? '&#8595;' : '&#8593;');
  195. $(ele).attr('data-status', status=='desc'? 'asc': 'desc');
  196. $("#search").submit();
  197. }
  198. </script>
  199. </body>
  200. </html>