截流自动化的商城平台
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

fans.html 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. {layout name="layout1" /}
  2. <style>
  3. .layui-table-cell {
  4. font-size:14px;
  5. padding:0 5px;
  6. height:auto;
  7. overflow:visible;
  8. text-overflow:inherit;
  9. white-space:normal;
  10. word-break: break-all;
  11. }
  12. </style>
  13. <div class="layui-fluid">
  14. <div class="layui-card">
  15. <div class="layui-tab layui-tab-card" lay-filter="tab-all">
  16. <ul class="layui-tab-title">
  17. <li data-type='all' class="layui-this">全部</li>
  18. <li data-type="first_leader">一级粉丝</li>
  19. <li data-type="second_leader">二级粉丝</li>
  20. <li data-type="third_leader">三级粉丝</li>
  21. </ul>
  22. <div class="layui-tab-item layui-show">
  23. <div class="layui-card">
  24. <div class="layui-form layui-card-header layuiadmin-card-header-auto">
  25. <div class="layui-form-item">
  26. <div class="layui-row">
  27. <div class="layui-inline">
  28. <label class="layui-form-label">会员信息:</label>
  29. <div class="layui-input-block">
  30. <select name="search_key">
  31. <option value="sn">会员编号</option>
  32. <option value="nickname">会员昵称</option>
  33. <option value="mobile">手机号码</option>
  34. </select>
  35. </div>
  36. </div>
  37. <div class="layui-inline">
  38. <input type="text" name="keyword" id="keyword" placeholder="请输入搜索内容" autocomplete="off" class="layui-input">
  39. </div>
  40. <div class="layui-inline">
  41. <button class="layui-btn layuiadmin-btn-member {$view_theme_color}" lay-submit lay-filter="fans-search">
  42. 查询
  43. </button>
  44. <button class="layui-btn layuiadmin-btn-express layui-btn-primary " lay-submit
  45. lay-filter="fans-clear-search">重置
  46. </button>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="layui-card-body">
  52. <table id="fans-lists" lay-filter="fans-lists"></table>
  53. <script type="text/html" id="member-operation">
  54. <div style="text-align: left">
  55. <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="info">分销资料</a>
  56. <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="fans">推广会员</a>
  57. <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="earnings_detail">收入明细</a><br/>
  58. <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="update_leader" style="margin-top: 5px">修改上级</a>
  59. <a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="freeze" style="margin-top: 5px">冻结资格</a>
  60. </div>
  61. </script>
  62. <!--会员信息-->
  63. <script type="text/html" id="user-info">
  64. <img src="{{d.avatar}}" style="height:80px;width: 80px" class="image-show">
  65. <div class="layui-input-inline" style="text-align: left">
  66. <p>会员编号:{{d.sn}}</p>
  67. <p>会员昵称:{{d.nickname}}</p>
  68. <p>手机号码:{{d.mobile}}</p>
  69. <p>会员等级:</p>
  70. <p>性别:{{d.sex}}</p>
  71. <p>注册时间:{{d.create_time}}</p>
  72. </div>
  73. </script>
  74. <!--会员信息-->
  75. <script type="text/html" id="leader-info">
  76. {{# if(d.leader.length == 0){ }}
  77. <p>无</p>
  78. {{# } else { }}
  79. <div class="layui-input-inline" >
  80. <p>会员编号:{{d.leader.sn}}</p>
  81. <p>会员昵称:{{d.leader.nickname}}</p>
  82. <p>手机号码:{{d.leader.mobile}}</p>
  83. <p>会员等级: {{d.leader.level}}</p>
  84. </div>
  85. {{# } }}
  86. </script>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <script>
  94. layui.config({
  95. version:"{$front_version}",
  96. base: '/static/lib/' //静态资源所在路径
  97. }).use([ 'table', 'laydate'], function () {
  98. var $ = layui.$
  99. , form = layui.form
  100. , table = layui.table
  101. , element = layui.element
  102. , laydate = layui.laydate;
  103. var user_id = {$user_id | raw};
  104. //图片放大
  105. $(document).on('click', '.image-show', function () {
  106. var src = $(this).attr('src');
  107. like.showImg(src,600);
  108. });
  109. //监听搜索
  110. form.on('submit(fans-search)', function (data) {
  111. var field = data.field;
  112. //执行重载
  113. table.reload('fans-lists', {
  114. where: field
  115. });
  116. });
  117. //清空查询
  118. form.on('submit(fans-clear-search)', function () {
  119. $('#keyword').val('');
  120. form.render('select');
  121. //刷新列表
  122. table.reload('fans-lists', {
  123. where: []
  124. });
  125. });
  126. //获取列表
  127. getList('all');
  128. //切换列表
  129. element.on('tab(tab-all)', function (data) {
  130. $('#keyword').val('');
  131. form.render('select');
  132. var type = $(this).attr('data-type');
  133. getList(type);
  134. });
  135. function getList(type) {
  136. table.render({
  137. elem: '#fans-lists'
  138. , url: '{:url("distribution.member/fans")}?id=' + user_id + '&type=' + type
  139. , cols: [[
  140. {type: 'numbers', title: '序号', align: 'center'}
  141. , {field: 'user', title: '会员信息', templet: '#user-info', width: 350, align: 'center'}
  142. , {field: 'leader', title: '上级推荐人', width: 260, align: 'center', templet:'#leader-info'}
  143. , {field: 'fans', title: '推广会员数', align: 'center'}
  144. , {field: 'distribution_num', title: '分销订单数', align: 'center'}
  145. , {field: 'distribution_amount', title: '分销订单金额', align: 'center'}
  146. , {field: 'distribution_money', title: '分销佣金', align: 'center'}
  147. ]]
  148. , page: true
  149. , text: {none: '暂无数据!'}
  150. , parseData: function (res) {
  151. return {
  152. "code": res.code,
  153. "msg": res.msg,
  154. "count": res.data.count,
  155. "data": res.data.lists,
  156. };
  157. },
  158. response: {
  159. statusCode: 1
  160. }
  161. });
  162. }
  163. });
  164. </script>