2937de08e4065a026ef0e4000c18f0e3.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <?php /*a:6:{s:65:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\wechat\reply\keyword.php";i:1595820902;s:61:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\container.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_head.php";i:1595820902;s:57:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\style.php";i:1595820902;s:62:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\inner_page.php";i:1595820902;s:64:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\public\frame_footer.php";i:1595820902;}*/ ?>
  2. <!DOCTYPE html>
  3. <html lang="zh-CN">
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <?php if(empty($is_layui) || (($is_layui instanceof \think\Collection || $is_layui instanceof \think\Paginator ) && $is_layui->isEmpty())): ?>
  8. <link href="/system/frame/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
  9. <?php endif; ?>
  10. <link href="/static/plug/layui/css/layui.css" rel="stylesheet">
  11. <link href="/system/css/layui-admin.css" rel="stylesheet">
  12. <link href="/system/frame/css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
  13. <link href="/system/frame/css/animate.min.css" rel="stylesheet">
  14. <link href="/system/frame/css/style.min.css?v=3.0.0" rel="stylesheet">
  15. <script src="/system/frame/js/jquery.min.js"></script>
  16. <script src="/system/frame/js/bootstrap.min.js"></script>
  17. <script src="/static/plug/layui/layui.all.js"></script>
  18. <script>
  19. $eb = parent._mpApi;
  20. window.controlle="<?php echo strtolower(trim(preg_replace("/[A-Z]/", "_\\0", app('request')->controller()), "_"));?>";
  21. window.module="<?php echo app('http')->getName();?>";
  22. </script>
  23. <title></title>
  24. <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
  25. <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
  26. <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
  27. <script>
  28. var hostname = location.hostname;
  29. if(location.port) hostname += ':' + location.port;
  30. requirejs.config({
  31. map: {
  32. '*': {
  33. 'css': '/static/plug/requirejs/require-css.js'
  34. }
  35. },
  36. shim:{
  37. 'iview':{
  38. deps:['css!iviewcss']
  39. },
  40. 'layer':{
  41. deps:['css!layercss']
  42. }
  43. },
  44. baseUrl:'//'+hostname+'/',
  45. paths: {
  46. 'static':'static',
  47. 'system':'system',
  48. 'vue':'static/plug/vue/dist/vue.min',
  49. 'axios':'static/plug/axios.min',
  50. 'iview':'static/plug/iview/dist/iview.min',
  51. 'iviewcss':'static/plug/iview/dist/styles/iview',
  52. 'lodash':'static/plug/lodash',
  53. 'layer':'static/plug/layer/layer',
  54. 'layercss':'static/plug/layer/theme/default/layer',
  55. 'jquery':'static/plug/jquery/jquery.min',
  56. 'moment':'static/plug/moment',
  57. 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
  58. 'formCreate':'/static/plug/form-create/form-create.min',
  59. },
  60. basket: {
  61. excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  62. // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  63. }
  64. });
  65. </script>
  66. <script type="text/javascript" src="/system/util/mpFrame.js"></script>
  67. </head>
  68. <body class="gray-bg">
  69. <div class="wrapper wrapper-content">
  70. <div class="row">
  71. <div class="col-sm-12">
  72. <div class="ibox">
  73. <div class="ibox-title">
  74. <button type="button" class="btn btn-w-m btn-primary" onclick="window.location.href='<?php echo Url('add_keyword'); ?>'">添加关键字</button>
  75. <div class="ibox-tools">
  76. <button class="btn btn-white btn-sm" onclick="location.reload()"><i class="fa fa-refresh"></i> 刷新</button>
  77. </div>
  78. <div style="margin-top: 2rem"></div>
  79. <div class="row">
  80. <div class="m-b m-l">
  81. <form action="" class="form-inline">
  82. <select name="type" aria-controls="editable" class="form-control input-sm">
  83. <option value="">回复类型</option>
  84. <option value="text" <?php if($where['type'] == 'text'): ?>selected="selected"<?php endif; ?>>文字消息</option>
  85. <option value="image" <?php if($where['type'] == 'image'): ?>selected="selected"<?php endif; ?>>图片消息</option>
  86. <option value="news" <?php if($where['type'] == 'news'): ?>selected="selected"<?php endif; ?>>图文消息</option>
  87. <option value="voice" <?php if($where['type'] == 'voice'): ?>selected="selected"<?php endif; ?>>声音消息</option>
  88. </select>
  89. <div class="input-group">
  90. <input type="text" name="key" value="<?php echo htmlentities($where['key']); ?>" placeholder="请输入关键词" class="input-sm form-control"> <span class="input-group-btn">
  91. <button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
  92. </div>
  93. </form>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="ibox-content">
  98. <div class="table-responsive">
  99. <table class="table table-striped table-bordered">
  100. <thead>
  101. <tr>
  102. <!-- <th class="text-center">编号</th>-->
  103. <th class="text-center">关键字</th>
  104. <th class="text-center">回复类型</th>
  105. <th class="text-center">状态</th>
  106. <th class="text-center">操作</th>
  107. </tr>
  108. </thead>
  109. <tbody class="">
  110. <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  111. <tr>
  112. <!-- <td class="text-center">-->
  113. <!-- <?php echo htmlentities($vo['id']); ?>-->
  114. <!-- </td>-->
  115. <td class="text-center">
  116. <?php echo htmlentities($vo['key']); ?>
  117. </td>
  118. <td class="text-center">
  119. <?php switch($vo['type']): case "text": ?>文字消息<?php break; case "voice": ?>声音消息<?php break; case "image": ?>图片消息<?php break; case "news": ?>图文消息<?php break; ?>
  120. <?php endswitch; ?>
  121. </td>
  122. <td class="text-center">
  123. <?php switch($vo['status']): case "1": ?><i class="fa fa-check text-navy"></i><?php break; case "0": ?><i class="fa fa-close text-danger"></i><?php break; ?>
  124. <?php endswitch; ?>
  125. </td>
  126. <td class="text-right">
  127. <button class="btn btn-info btn-xs" type="button" onclick="window.location.href='<?php echo Url('info_keyword',array('key'=>$vo['key'])); ?>'" ><i class="fa fa-edit"></i> 编辑</button>
  128. <button class="btn btn-danger btn-xs " data-url="<?php echo Url('delete',array('id'=>$vo['id'])); ?>" type="button"><i class="fa fa-times"></i> 删除
  129. </button>
  130. </td>
  131. </tr>
  132. <?php endforeach; endif; else: echo "" ;endif; ?>
  133. </tbody>
  134. </table>
  135. </div>
  136. <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
  137. <div class="row">
  138. <div class="col-sm-6">
  139. <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
  140. </div>
  141. <div class="col-sm-6">
  142. <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
  143. <?php echo $page;?>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. <script>
  152. $('.btn-danger').on('click',function(){
  153. window.t = $(this);
  154. var _this = $(this),url =_this.data('url');
  155. $eb.$swal('delete',function(){
  156. $eb.axios.get(url).then(function(res){
  157. console.log(res);
  158. if(res.status == 200 && res.data.code == 200) {
  159. $eb.$swal('success',res.data.msg);
  160. _this.parents('tr').remove();
  161. }else
  162. return Promise.reject(res.data.msg || '删除失败')
  163. }).catch(function(err){
  164. $eb.$swal('error',err);
  165. });
  166. })
  167. });
  168. </script>
  169. </div>
  170. </body>
  171. </html>