人人商城

send.html 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {template 'common/header'}
  2. <style>
  3. .label{line-height: 2}
  4. .popover{max-width:420px;}
  5. </style>
  6. <ul class="nav nav-tabs">
  7. <li {if $_GPC['a'] == 'mass' && $do == 'list'}class="active"{/if}><a href="{php echo url('material/mass/')}">定时群发</a></li>
  8. <li {if $_GPC['a'] == 'mass' && $do == 'send'}class="active"{/if}><a href="{php echo url('material/mass/send')}">发送记录</a></li>
  9. <li {if $type == 'image'}class="active"{/if}><a href="{php echo url('material/display/list', array('type' => 'image'));}">图片</a></li>
  10. <li {if $type == 'voice'}class="active"{/if}><a href="{php echo url('material/display/list', array('type' => 'voice'));}">语音</a></li>
  11. <li {if $type == 'video'}class="active"{/if}><a href="{php echo url('material/display/list', array('type' => 'video'));}">视频</a></li>
  12. <li {if $type == 'news'}class="active"{/if}><a href="{php echo url('material/display/list', array('type' => 'news'));}">图文</a></li>
  13. <li {if $action == 'post' && $do == 'news'}class="active"{/if}><a href="{php echo url('material/post/edit');}">新增图文素材</a></li>
  14. </ul>
  15. <v class="clearfix">
  16. <form action="?{$_SERVER['QUERY_STRING']}" method="post" id="form1">
  17. <div class="panel panel-default">
  18. <div class="panel-body table-responsive">
  19. <table class="table table-hover" cellspacing="0" cellpadding="0">
  20. <thead class="navbar-inner">
  21. <tr>
  22. <th>消息详情</th>
  23. <th>发送用户组</th>
  24. <th>发送人数</th>
  25. <th>状态</th>
  26. <th width="250">发送时间</th>
  27. <th>添加时间</th>
  28. <th width="170"></th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {loop $list $li}
  33. <tr>
  34. <td>
  35. <a href="{php echo url('material/display/list', array('type' => $li['msgtype'], 'id' => $li['attach_id']));}" target="_blank">{$types[$li['msgtype']]}</a>
  36. </td>
  37. <td>{$li['groupname']}</td>
  38. <td>{if $li['groupid'] == '-1'}全部粉丝{else}{$li['fansnum']}{/if}</td>
  39. <td>
  40. {if !$li['status']}
  41. <span class="label label-success">已发送</span>
  42. {elseif $li['status'] == 1}
  43. <span class="label label-warning">未发送</span>
  44. {elseif $li['status'] == 2}
  45. <span class="label label-danger">发送失败</span>
  46. {/if}
  47. </td>
  48. <td>
  49. {if !$li['type']}
  50. {php echo date('Y-m-d H:i:s', $li['createtime']);}
  51. {else}
  52. <span class="label label-info">计划发送时间:{php echo date('Y-m-d H:i', $li['sendtime']);}</span> <br>
  53. {if !$li['status']}
  54. <span class="label label-success">实际发送时间:{php echo date('Y-m-d H:i', $li['finalsendtime']);}</span>
  55. {elseif $li['status'] == 2}
  56. <span class="label label-danger">实际发送时间:{php echo date('Y-m-d H:i', $li['finalsendtime']);}</span>
  57. {/if}
  58. {/if}
  59. </td>
  60. <td>{php echo date('Y-m-d H:i', $li['createtime']);}</td>
  61. <td align="right">
  62. {if $li['type'] == 1}
  63. {if !$li['cron_id'] && $li['sendtime'] > TIMESTAMP}
  64. <a href="{php echo url('material/mass/cron', array('id' => $li['id']));}" class="btn btn-danger btn-sm">同步到云服务</a>
  65. {/if}
  66. <a href="javascript:;" title="" data-tid="{$li['id']}" data-type="mass" data-module="task" class="btn btn-default mass-log">日志</a>
  67. {/if}
  68. </td>
  69. </tr>
  70. {/loop}
  71. </tbody>
  72. </table>
  73. </div>
  74. </div>
  75. </form>
  76. </div>
  77. <script>
  78. require(['bootstrap'], function(){
  79. $('.tip').hover(function(){
  80. $(this).tooltip();
  81. });
  82. $('.mass-log').hover(function(){
  83. obj = $(this);
  84. $.post("{php echo url('utility/cron/log');}", {tid: $(this).data('tid'), type: $(this).data('type'), module: $(this).data('module')}, function(data) {
  85. data = $.parseJSON(data);
  86. var html = '';
  87. if(data.message.items.length == 0) {
  88. html = '<tr><td class="text-center"><i class="fa fa-info-circle"></i> 暂无数据</td></tr>';
  89. } else{
  90. $.each(data.message.items, function(k, v){
  91. html += '<tr><td>' + v.createtime + ' ' + v.note + '</td></tr>';
  92. });
  93. }
  94. obj.popover({
  95. 'html':true,
  96. 'placement':'left',
  97. 'trigger':'manual',
  98. 'title':'触发日志',
  99. 'content':'<table class="table-cron table">' + html + '</table>'
  100. });
  101. obj.popover('toggle');
  102. });
  103. }, function(){
  104. $(this).popover('toggle');
  105. });
  106. });
  107. </script>
  108. {template 'common/footer'}