index.html 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. {extend name='admin@main'}
  2. {block name="button"}
  3. {if auth("service/fans/setblack")}
  4. <button data-action='{:url("setblack")}' data-rule="openid#{key}" data-csrf="{:systoken('service/fans/setblack')}" class='layui-btn layui-btn-sm layui-btn-primary'>批量拉黑</button>
  5. {/if}
  6. {if auth("service/fans/delblack")}
  7. <button data-action='{:url("delblack")}' data-rule="openid#{key}" data-csrf="{:systoken('service/fans/delblack')}" class='layui-btn layui-btn-sm layui-btn-primary'>取消拉黑</button>
  8. {/if}
  9. {if auth("service/fans/sync")}
  10. <button data-load='{:url("sync")}' class='layui-btn layui-btn-sm layui-btn-primary'>同步粉丝</button>
  11. {/if}
  12. {/block}
  13. {block name="content"}
  14. <div class="think-box-shadow">
  15. {include file='fans/index_search'}
  16. <table class="layui-table margin-top-10" lay-skin="line">
  17. {notempty name='list'}
  18. <thead>
  19. <tr>
  20. <th class='list-table-check-td think-checkbox'><input data-auto-none data-check-target='.list-check-box' type='checkbox'></th>
  21. <th width="180px" class='text-left nowrap'>微信昵称</th>
  22. <th width="180px" class="text-left nowrap">粉丝标签</th>
  23. <th width="150px" class='text-left nowrap'>性别语言</th>
  24. <th width="180px" class='text-left nowrap'>关注时间</th>
  25. <th width="80px"></th>
  26. <th></th>
  27. </tr>
  28. </thead>
  29. {/notempty}
  30. <tbody>
  31. {foreach $list as $key=>$vo}
  32. <tr>
  33. <td class='list-table-check-td think-checkbox'>
  34. <input class="list-check-box" value='{$vo.openid}' type='checkbox'>
  35. </td>
  36. <td class='text-left nowrap relative layui-elip'>
  37. <img src="{$vo.headimgurl|default=''}" onerror="$(this).remove()" data-tips-image class="inline-block" style="width:40px;height:40px;vertical-align:top;margin-right:5px">
  38. <div class="inline-block">
  39. 昵称:{$vo.nickname|default='--'}
  40. <br>
  41. 区域:{$vo.country|default='--'} {$vo.province} {$vo.city}
  42. </div>
  43. </td>
  44. <td class="text-left padding-0">
  45. <div style="max-height:60px;overflow:auto">{foreach $vo.tags as $t}<p><span class="layui-badge layui-bg-cyan margin-right-5">{$t|default='--'}</span></p>{/foreach}</div>
  46. </td>
  47. <td class='text-left nowrap'>
  48. 性别:{switch name='vo.sex'}{case value='1'}男{/case}{case value='2'}女{/case}{default}未知{/switch}
  49. <br>
  50. 语言:{$vo.language|raw}
  51. </td>
  52. <td class='text-left nowrap'>
  53. 日期:{$vo.subscribe_at|format_datetime|str_replace=' ','<br>时间:',###|raw}
  54. </td>
  55. <td class='text-center nowrap'>
  56. {eq name='vo.subscribe' value='0'}
  57. <span class="layui-badge">未关注</span>
  58. {else}
  59. <span class="layui-badge layui-bg-green">已关注</span>
  60. {/eq}
  61. <br>
  62. {eq name='vo.is_black' value='0'}
  63. <span class="layui-badge layui-bg-green">未拉黑</span>
  64. {else}
  65. <span class="layui-badge">已拉黑</span>
  66. {/eq}
  67. </td>
  68. <td class="nowrap">
  69. {eq name='vo.is_black' value='0'}
  70. <!--{if auth("service/fans/setblack")}-->
  71. <a class="margin-left-10 layui-btn layui-btn-normal layui-btn-sm" data-action="{:url('setblack')}" data-value="openid#{$vo.openid}" data-csrf="{:systoken('service/fans/setblack')}">拉 黑</a>
  72. <!--{/if}-->
  73. {else}
  74. <!--{if auth("service/fans/delblack")}-->
  75. <a class="margin-left-10 layui-btn layui-btn-normal layui-btn-sm" data-action="{:url('delblack')}" data-value="openid#{$vo.openid}" data-csrf="{:systoken('service/fans/delblack')}">拉 白</a>
  76. <!--{/if}-->
  77. {/eq}
  78. {if auth("service/fans/remove")}
  79. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该粉丝吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('service/fans/remove')}">删 除</a>
  80. {/if}
  81. </td>
  82. </tr>
  83. {/foreach}
  84. </tbody>
  85. </table>
  86. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  87. </div>
  88. {/block}