chatlog.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. {template 'common/header'}
  2. <div class="panel panel-info">
  3. <div class="panel-heading">筛选</div>
  4. <div class="panel-body">
  5. <form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
  6. <input type="hidden" name="c" value="site">
  7. <input type="hidden" name="a" value="entry">
  8. <input type="hidden" name="m" value="custom">
  9. <input type="hidden" name="do" value="chatlog">
  10. <input type="hidden" name="token" value="{$_W['token']}">
  11. <input type="hidden" name="page" value="1" id="page">
  12. <div class="form-group">
  13. <label class="col-xs-12 col-sm-3 col-md-2 control-label">粉丝昵称</label>
  14. <div class="col-sm-6 col-md-8 col-lg-8">
  15. <input type="text" class="form-control" name="nickname" id="nickname" placeholder="请输入粉丝昵称" value="{$_GPC['nickname']}" />
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="col-xs-12 col-sm-3 col-md-2 control-label">粉丝openid</label>
  20. <div class="col-sm-6 col-md-8 col-lg-8">
  21. <input type="text" class="form-control" name="openid" id="openid" placeholder="请输入粉丝openid" value="{$_GPC['openid']}" />
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-xs-12 col-sm-3 col-md-2 control-label">时间</label>
  26. <div class="col-sm-6 col-md-8 col-lg-8">
  27. {php echo tpl_form_field_date('starttime', $starttime, false)}
  28. <div class="help-block">公众平台不支持跨日查询</div>
  29. </div>
  30. <div class="pull-right col-xs-12 col-sm-3 col-md-2 col-lg-2">
  31. <button class="btn btn-default" id="search"><i class="fa fa-search"></i> 搜索</button>
  32. </div>
  33. </div>
  34. </form>
  35. </div>
  36. </div>
  37. <style>
  38. .infol{margin-left:35px;padding:5px;max-width:60%;}
  39. .infor{margin-right:35px;padding:5px;max-width:60%;}
  40. .pull-left,.pull-right{position:relative;}
  41. .spanabsolute{position:absolute;top:50px;left:0;}
  42. .spanrabsolute{position:absolute;top:50px;right:10px;}
  43. </style>
  44. <div class="panel panel-default" style="margin-bottom:0">
  45. <div class="panel-heading">聊天记录</div>
  46. <div class="panel-body">
  47. {if is_error($logs)}
  48. <div class="text-center text-danger"><i class="fa fa-info-circle"></i> 搜索消息记录时出错,错误详情:{$logs['message']}</div>
  49. {elseif empty($logs['recordlist'])}
  50. <div class="text-center"><i class="fa fa-info-circle"> 没有符合条件的记录</i></div>
  51. {else}
  52. {loop $logs['recordlist'] $log}
  53. {if $log['opercode'] == 1000}
  54. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  55. <div class="pull-left">
  56. <img src="{if !empty($avatar)}{$avatar}{else}resource/images/noavatar_middle.gif{/if}" width="48"><br>
  57. <span class="spanabsolute">{if !empty($nickname)}{$nickname}{else}{$log['openid']}{/if}</span>
  58. </div>
  59. <div class="alert alert-info pull-left infol">
  60. {$codedata[$log['opercode']]}<br>
  61. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  62. </div>
  63. <div style="clear:both"></div>
  64. </div>
  65. {elseif $log['opercode'] == 1001}
  66. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  67. <div class="pull-right">
  68. <img src="resource/images/noavatar_middle.gif" width="48"><br>
  69. <span class="spanrabsolute">{$log['worker']}</span>
  70. </div>
  71. <div class="alert alert-danger pull-right infor">
  72. {$codedata[$log['opercode']]} <br>
  73. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  74. </div>
  75. </div>
  76. {elseif $log['opercode'] == 1002}
  77. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  78. <div class="pull-right">
  79. <img src="resource/images/noavatar_middle.gif" width="48"><br>
  80. <span class="spanrabsolute">{$log['worker']}</span>
  81. </div>
  82. <div class="alert alert-danger pull-right infor">
  83. {$log['text']}<br>
  84. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  85. </div>
  86. </div>
  87. {elseif $log['opercode'] == 1004}
  88. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  89. <div class="pull-right">
  90. <img src="resource/images/noavatar_middle.gif" width="48"><br>
  91. <span class="spanrabsolute">{$log['worker']}</span>
  92. </div>
  93. <div class="alert alert-danger pull-right infor">
  94. {$codedata[$log['opercode']]}<br>
  95. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  96. </div>
  97. </div>
  98. {elseif $log['opercode'] == 1005}
  99. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  100. <div class="pull-right">
  101. <img src="resource/images/noavatar_middle.gif" width="48"><br>
  102. <span class="spanrabsolute">{$log['worker']}</span>
  103. </div>
  104. <div class="alert alert-danger pull-right infor">
  105. {$codedata[$log['opercode']]}<br>
  106. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  107. </div>
  108. </div>
  109. {elseif $log['opercode'] == 2001}
  110. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  111. <div class="pull-left">
  112. <img src="{if !empty($avatar)}{$avatar}{else}resource/images/noavatar_middle.gif{/if}" width="48"><br>
  113. <span class="spanabsolute">{if !empty($nickname)}{$nickname}{else}{$log['openid']}{/if}</span>
  114. </div>
  115. <div class="alert alert-info pull-left infol">
  116. {$log['text']}<br>
  117. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  118. </div>
  119. </div>
  120. {elseif $log['opercode'] == 2002}
  121. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  122. <div class="pull-right">
  123. <img src="resource/images/noavatar_middle.gif" width="48"><br>
  124. <span class="spanrabsolute">{$log['worker']}</span>
  125. </div>
  126. <div class="alert alert-danger pull-right infor">
  127. {$log['text']}<br>
  128. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  129. </div>
  130. </div>
  131. {elseif $log['opercode'] == 2003}
  132. <div class="pull-left col-lg-12 col-md-12 col-sm-12 col-xs-12">
  133. <div class="pull-left">
  134. <img src="{if !empty($avatar)}{$avatar}{else}resource/images/noavatar_middle.gif{/if}" width="48"><br>
  135. <span class="spanabsolute">{if !empty($nickname)}{$nickname}{else}{$log['openid']}{/if}</span>
  136. </div>
  137. <div class="alert alert-info pull-left infol">
  138. {$log['text']}<br>
  139. <small class="text-danger">{php echo date('m-d H:i:s', $log['time']);} --- {$codedata[$log['opercode']]}</small>
  140. </div>
  141. </div>
  142. {/if}
  143. {/loop}
  144. {/if}
  145. </div>
  146. </div>
  147. <form class="form-horizontal" role="form" style="margin-top:10px">
  148. <div class="form-group">
  149. <div class="col-sm-12">
  150. {if $pindex > 1}
  151. <a href="javascript:;" onclick="$('#page').val($(this).attr('page'));$('#form1').submit();return;" id="prev" page="{php echo ($pindex - 1)}" class="btn btn-default"><i class="fa fa-angle-double-left"></i></a>
  152. {/if}
  153. {if !empty($next)}
  154. <a href="javascript:;" onclick="$('#page').val($(this).attr('page'));$('#form1').submit();return;" id="next" page="{php echo ($pindex + 1)}"class="btn btn-primary"><i class="fa fa-angle-double-right"></i></a>
  155. {/if}
  156. </div>
  157. </div>
  158. </form>
  159. <script>
  160. require(['util'], function(u) {
  161. $('#form1').submit(function(){
  162. var nickname = $('#nickname').val().trim();
  163. var openid = $('#openid').val().trim();
  164. var starttime = $('input[name="starttime"]').val();
  165. if(nickname == '' && openid == '') {
  166. u.message('粉丝openid和粉丝昵称必须填写一项');
  167. return false;
  168. }
  169. });
  170. });
  171. </script>
  172. {template 'common/footer'}