index.html 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {extend name="../../admin/view/main"}
  2. {block name="button"}
  3. <!--{if auth("add")}-->
  4. <button data-open="{:url('add')}" class='layui-btn layui-btn-sm layui-btn-primary'>添加规则</button>
  5. <!--{/if}-->
  6. <!--{if auth("remove")}-->
  7. <button data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" data-confirm="确定要删除这些规则吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除规则</button>
  8. <!--{/if}-->
  9. {/block}
  10. {block name='content'}
  11. <div class="layui-badge think-bg-violet text-left notselect block shadow margin-0 padding-10 padding-left-20 border-radius-5 font-s15">
  12. 特别注意:关注自动回复使用微信客服消息接口发送,因此多图文只能发送每组图文的第一篇文章,另外还需要开启系统任务功能。
  13. </div>
  14. <div class="think-box-shadow margin-top-10">
  15. {include file='auto/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'>
  21. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  22. </th>
  23. <th class="text-left nowrap">消息编号</th>
  24. <th class="text-left nowrap">延迟时间</th>
  25. <th class="text-center nowrap">消息类型</th>
  26. <th class="text-center nowrap">预览</th>
  27. <th class="text-left nowrap">添加时间</th>
  28. <th class="text-left nowrap">状态</th>
  29. <th></th>
  30. </tr>
  31. </thead>
  32. {/notempty}
  33. <tbody>
  34. {foreach $list as $key=>$vo}
  35. <tr>
  36. <td class='list-table-check-td think-checkbox'>
  37. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  38. </td>
  39. <td class="text-left nowrap">{$vo.code}</td>
  40. <td class="text-left nowrap">{$vo.time}</td>
  41. <td class="text-center nowrap">{$vo.type}</td>
  42. <td class="text-center nowrap notselect">
  43. {if $vo.type eq '音乐'}
  44. <a data-phone-view='{:url("@wechat/api.view/music")}?title={$vo.music_title|urlencode}&desc={$vo.music_desc|urlencode}'>预览</a>
  45. {elseif in_array($vo.type,['文字','转客服'])}
  46. <a data-phone-view='{:url("@wechat/api.view/text")}?content={$vo.content|urlencode}'>预览</a>
  47. {elseif $vo.type eq '图片'}
  48. <a data-phone-view='{:url("@wechat/api.view/image")}?content={$vo.image_url|urlencode}'>预览</a>
  49. {elseif $vo.type eq '图文'}
  50. <a data-phone-view='{:url("@wechat/api.view/news")}?id={$vo.news_id}'>预览</a>
  51. {elseif $vo.type eq '视频'}
  52. <a data-phone-view='{:url("@wechat/api.view/video")}?title={$vo.video_title|urlencode}&desc={$vo.video_desc|urlencode}&url={$vo.video_url|urlencode}'>预览</a>
  53. {elseif $vo.type eq '语音'}
  54. <a data-phone-view='{:url("@wechat/api.view/voice")}?content={$vo.voice_url|urlencode}'>预览</a>
  55. {else} {$vo.content} {/if}
  56. </td>
  57. <td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
  58. <td class='text-left nowrap'>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
  59. <td class='text-left nowrap'>
  60. <!--{if auth("edit")}-->
  61. <a class="layui-btn layui-btn-sm" data-open='{:url("edit")}?id={$vo.id}'>编 辑</a>
  62. <!--{/if}-->
  63. <!--{if auth("state") and $vo.status eq 1}-->
  64. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
  65. <!--{elseif auth("state") and $vo.status eq 0}-->
  66. <a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">激 活</a>
  67. <!--{/if}-->
  68. <!--{if auth("remove")}-->
  69. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该规则吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
  70. <!--{/if}-->
  71. </td>
  72. </tr>
  73. {/foreach}
  74. </tbody>
  75. </table>
  76. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  77. </div>
  78. {/block}