d04554c9949b5d6930e9f1ae8ea36009.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?php /*a:6:{s:78:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\wechat\wechat_news_category\index.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. <link href="/system/module/wechat/news_category/css/style.css" type="text/css" rel="stylesheet">
  25. <!--<script type="text/javascript" src="/static/plug/basket.js"></script>-->
  26. <script type="text/javascript" src="/static/plug/requirejs/require.js"></script>
  27. <?php /* <script type="text/javascript" src="/static/plug/requirejs/require-basket-load.js"></script> */ ?>
  28. <script>
  29. var hostname = location.hostname;
  30. if(location.port) hostname += ':' + location.port;
  31. requirejs.config({
  32. map: {
  33. '*': {
  34. 'css': '/static/plug/requirejs/require-css.js'
  35. }
  36. },
  37. shim:{
  38. 'iview':{
  39. deps:['css!iviewcss']
  40. },
  41. 'layer':{
  42. deps:['css!layercss']
  43. }
  44. },
  45. baseUrl:'//'+hostname+'/',
  46. paths: {
  47. 'static':'static',
  48. 'system':'system',
  49. 'vue':'static/plug/vue/dist/vue.min',
  50. 'axios':'static/plug/axios.min',
  51. 'iview':'static/plug/iview/dist/iview.min',
  52. 'iviewcss':'static/plug/iview/dist/styles/iview',
  53. 'lodash':'static/plug/lodash',
  54. 'layer':'static/plug/layer/layer',
  55. 'layercss':'static/plug/layer/theme/default/layer',
  56. 'jquery':'static/plug/jquery/jquery.min',
  57. 'moment':'static/plug/moment',
  58. 'sweetalert':'static/plug/sweetalert2/sweetalert2.all.min',
  59. 'formCreate':'/static/plug/form-create/form-create.min',
  60. },
  61. basket: {
  62. excludes:['system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  63. // excludes:['system/util/mpFormBuilder','system/js/index','system/util/mpVueComponent','system/util/mpVuePackage']
  64. }
  65. });
  66. </script>
  67. <script type="text/javascript" src="/system/util/mpFrame.js"></script>
  68. </head>
  69. <body class="gray-bg">
  70. <div class="wrapper wrapper-content">
  71. <div class="row">
  72. <div class="col-sm-12">
  73. <div class="ibox">
  74. <div class="ibox-title">
  75. <button type="button" class="btn btn-w-m btn-primary append-filed" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('append'); ?>',{w:1200,h:666})">添加图文消息</button>
  76. <div class="ibox-tools">
  77. <button class="btn btn-white btn-sm" onclick="location.reload()"><i class="fa fa-refresh"></i> 刷新</button>
  78. </div>
  79. <div style="margin-top: 2rem"></div>
  80. <div class="row">
  81. <div class="col-sm-8 m-b-xs">
  82. <form action="" class="form-inline">
  83. <i class="fa fa-search" style="margin-right: 10px;"></i>
  84. <div class="input-group">
  85. <input type="text" name="cate_name" value="<?php echo htmlentities($where['cate_name']); ?>" placeholder="请输入关键词" class="input-sm form-control" />
  86. <span class="input-group-btn">
  87. <button type="submit" class="btn btn-sm btn-primary"> 搜索</button>
  88. </span>
  89. </div>
  90. </form>
  91. </div>
  92. </div>
  93. </div>
  94. <div class="ibox-content">
  95. <div id="news_box">
  96. <?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;?>
  97. <div class="news_item col-sm-2" >
  98. <div class="title" ><span>图文名称:<?php echo htmlentities($vo['cate_name']); ?></span></div>
  99. <div class="news_tools hide">
  100. <a onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('modify',array('id'=>$vo['id'])); ?>',{w:1200,h:666})" href="javascript:void(0)">编辑</a>
  101. <a href="javascript:void(0)" data-url="<?php echo Url('delete',array('id'=>$vo['id'])); ?>" class="del_news_one">删除</a>
  102. </div>
  103. <?php if(is_array($vo['new']) || $vo['new'] instanceof \think\Collection || $vo['new'] instanceof \think\Paginator): $k = 0; $__LIST__ = $vo['new'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vvo): $mod = ($k % 2 );++$k;if($k == 1): ?>
  104. <div class="news_articel_item" style="background-image:url(<?php echo htmlentities($vvo['image_input']); ?>)">
  105. <p><?php echo htmlentities($vvo['title']); ?></p>
  106. </div>
  107. <div class="hr-line-dashed"></div>
  108. <?php else: ?>
  109. <div class="news_articel_item other">
  110. <div class="right-text"><?php echo htmlentities($vvo['title']); ?></div>
  111. <div class="left-image" style="background-image:url(<?php echo htmlentities($vvo['image_input']); ?>);"></div>
  112. </div>
  113. <div class="hr-line-dashed"></div>
  114. <?php endif; ?>
  115. <?php endforeach; endif; else: echo "" ;endif; ?>
  116. </div>
  117. <?php endforeach; endif; else: echo "" ;endif; ?>
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <div style="margin-left: 10px">
  124. <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
  125. <div class="row">
  126. <div class="col-sm-6">
  127. <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
  128. </div>
  129. <div class="col-sm-6">
  130. <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
  131. <?php echo $page;?>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <script>
  137. $('body').on('mouseenter', '.news_item', function () {
  138. $(this).find('.news_tools').removeClass('hide');
  139. }).on('mouseleave', '.news_item', function () {
  140. $(this).find('.news_tools').addClass('hide');
  141. });
  142. $('.del_news_one').on('click',function(){
  143. window.t = $(this);
  144. var _this = $(this),url =_this.data('url');
  145. $eb.$swal('delete',function(){
  146. $eb.axios.get(url).then(function(res){
  147. if(res.status == 200 && res.data.code == 200) {
  148. $eb.$swal('success',res.data.msg);
  149. _this.parents('.news_item').remove();
  150. }else
  151. return Promise.reject(res.data.msg || '删除失败')
  152. }).catch(function(err){
  153. $eb.$swal('error',err);
  154. });
  155. })
  156. });
  157. </script>
  158. </div>
  159. </body>
  160. </html>