0ee436697dcbfee103a2742c2b60b91f.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php /*a:6:{s:66:"D:\phpstudy_pro\WWW\CRMEB\app\admin\view\article\article\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/css/index.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. <style>
  72. tr td img{height: 50px;}
  73. </style>
  74. <div class="row">
  75. <div class="col-sm-3">
  76. <div class="ibox">
  77. <div class="ibox-title">分类</div>
  78. <div class="ibox-content">
  79. <ul class="folder-list m-b-md">
  80. <?php if(is_array($tree) || $tree instanceof \think\Collection || $tree instanceof \think\Paginator): $i = 0; $__LIST__ = $tree;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
  81. <li class="p-xxs"><a href="<?php echo Url('article.article/index',array('pid'=>$vo['id'])); ?>"><?php echo htmlentities($vo['html']); ?><?php echo htmlentities($vo['title']); ?></a></li>
  82. <?php endforeach; endif; else: echo "" ;endif; ?>
  83. </ul>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="col-sm-9 m-l-n-md">
  88. <div class="ibox">
  89. <div class="ibox-title">
  90. <button type="button" class="btn btn-w-m btn-primary" onclick="$eb.createModalFrame(this.innerText,'<?php echo Url('create',array('cid'=>$where['cid'])); ?>',{w:1100,h:760})">添加文章</button>
  91. <div style="margin-top: 2rem"></div>
  92. <div class="row">
  93. <div class="m-b m-l">
  94. <form action="" class="form-inline">
  95. <div class="input-group">
  96. <input type="text" name="title" value="<?php echo htmlentities($where['title']); ?>" placeholder="请输入关键词" class="input-sm form-control"> <span class="input-group-btn"><button type="submit" class="btn btn-sm btn-primary"> <i class="fa fa-search" ></i>搜索</button> </span>
  97. </div>
  98. </form>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="ibox-content">
  103. <table class="footable table table-striped table-bordered " data-page-size="20">
  104. <thead>
  105. <tr>
  106. <th class="text-center" width="5%">id</th>
  107. <th class="text-center" width="10%">图片</th>
  108. <th class="text-left" >[分类]标题</th>
  109. <th class="text-center" width="8%">浏览量</th>
  110. <th class="text-center">关联标题</th>
  111. <th class="text-center" width="15%">添加时间</th>
  112. <th class="text-center" width="20%">操作</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. <?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;?>
  117. <tr>
  118. <td><?php echo htmlentities($vo['id']); ?></td>
  119. <td>
  120. <img src="<?php echo htmlentities($vo['image_input']); ?>"/>
  121. </td>
  122. <td>[<?php echo htmlentities($vo['catename']); ?>]<?php echo htmlentities($vo['title']); ?></td>
  123. <td><?php echo htmlentities($vo['visit']); ?></td>
  124. <td><?php echo htmlentities($vo['store_name']); ?></td>
  125. <td><?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($vo['add_time'])? strtotime($vo['add_time']) : $vo['add_time'])); ?></td>
  126. <td class="text-center">
  127. <button style="margin-top: 5px;" class="btn btn-info btn-xs" type="button" onclick="$eb.createModalFrame('编辑','<?php echo Url('create',array('id'=>$vo['id'],'cid'=>$where['cid'])); ?>',{w:1100,h:760})"><i class="fa fa-edit"></i> 编辑</button>
  128. <?php if($vo['product_id']): ?>
  129. <button style="margin-top: 5px;" class="btn btn-warning btn-xs underline" data-id="<?php echo htmlentities($vo['id']); ?>" type="button" data-url="<?php echo Url('unrelation',array('id'=>$vo['id'])); ?>" ><i class="fa fa-chain-broken"></i> 取消关联</button>
  130. <?php else: ?>
  131. <button style="margin-top: 5px;" class="btn btn-warning btn-xs openWindow" data-id="<?php echo htmlentities($vo['id']); ?>" type="button" data-url="<?php echo Url('relation',array('id'=>$vo['id'])); ?>" ><i class="fa fa-chain"></i> 关联产品</button>
  132. <?php endif; ?>
  133. <button style="margin-top: 5px;" class="btn btn-danger btn-xs del_news_one" data-id="<?php echo htmlentities($vo['id']); ?>" type="button" data-url="<?php echo Url('delete',array('id'=>$vo['id'])); ?>" ><i class="fa fa-times"></i> 删除</button>
  134. </td>
  135. </tr>
  136. <?php endforeach; endif; else: echo "" ;endif; ?>
  137. </tbody>
  138. </table>
  139. </div>
  140. </div>
  141. <div style="margin-left: 10px">
  142. <link href="/system/frame/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
  143. <div class="row">
  144. <div class="col-sm-6">
  145. <div class="dataTables_info" id="DataTables_Table_0_info" role="alert" aria-live="polite" aria-relevant="all">共 <?php echo htmlentities($total); ?> 项</div>
  146. </div>
  147. <div class="col-sm-6">
  148. <div class="dataTables_paginate paging_simple_numbers" id="editable_paginate">
  149. <?php echo $page;?>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <script>
  157. $('.del_news_one').on('click',function(){
  158. window.t = $(this);
  159. var _this = $(this),url =_this.data('url');
  160. $eb.$swal('delete',function(){
  161. $eb.axios.get(url).then(function(res){
  162. console.log(res);
  163. if(res.status == 200 && res.data.code == 200) {
  164. $eb.$swal('success',res.data.msg);
  165. _this.parents('tr').remove();
  166. }else
  167. return Promise.reject(res.data.msg || '删除失败')
  168. }).catch(function(err){
  169. $eb.$swal('error',err);
  170. });
  171. })
  172. });
  173. $('.openWindow').on('click',function () {
  174. return $eb.createModalFrame('选择产品',$(this).data('url'));
  175. });
  176. $('.underline').on('click',function () {
  177. var url=$(this).data('url');
  178. $eb.$swal('delete',function(){
  179. $eb.axios.get(url).then(function(res){
  180. if(res.status == 200 && res.data.code == 200) {
  181. $eb.$swal('success',res.data.msg);
  182. window.location.reload();
  183. }else
  184. return Promise.reject(res.data.msg || '取消失败')
  185. }).catch(function(err){
  186. $eb.$swal('error',err);
  187. });
  188. },{title:'确认取消关联产品?',text:'取消后可再关联页选择产品重新关联',confirm:'确定'})
  189. })
  190. </script>
  191. </div>
  192. </body>
  193. </html>