diff --git a/control/tpl.php b/control/tpl.php index a89a5e7..9d3026e 100644 --- a/control/tpl.php +++ b/control/tpl.php @@ -22,7 +22,7 @@ class tpl extends publicBase { $this->view['menu_page'] = 'deliver_remind'; } - public function ajax_get_order_list() { + public function ajax_get_deliver_remind_list() { $data = array(); $page = $this->get('page')+0; $limit = $this->get('limit')+0; @@ -45,8 +45,85 @@ class tpl extends publicBase { } $reture_data['data'] = $data; - $reture_data['total'] = 300; + $reture_data['total'] = 300000; + + $this->ajax_json(true, '', $reture_data); + } + + /** + * 订单列表 + */ + public function order_list() { + $this->view['menu_page'] = 'order_list'; + } + + public function ajax_get_order_list() { + $data = array(); + $page = $this->get('page')+0; + $limit = $this->get('limit')+0; + for($i=0;$i < 10;$i++){ + $vals = array( + "goods_name" => "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系", + "tid" => "43565765786867898".$i, + "sale_date" => date('Y-m-d H:i:s', time()+($i*8)), + "income" => "999.09", + "order_status" => 0, + "sale_status" => 0, + ); + if($i % 2 == 0) { + $vals['order_status'] = 1; + $vals['sale_status'] = 1; + } + + if($i % 3 == 0) { + $vals['order_status'] = 0; + $vals['sale_status'] = 2; + } + $data[] = $vals; + } + + $reture_data['data'] = $data; + $reture_data['total'] = 300000; $this->ajax_json(true, '', $reture_data); } + + /** + * 售后监控 + */ + public function sale_monitor() { + $this->view['menu_page'] = 'sale_monitor'; + } + + public function ajax_sale_monitor_list() { + $data = array(); + $page = $this->get('page')+0; + $limit = $this->get('limit')+0; + for($i=0;$i < 10;$i++){ + $vals = array( + "goods_name" => "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系", + "tid" => "43565765786867898".$i, + "sale_date" => date('Y-m-d H:i:s', time()+($i*8)), + "income" => "999.09", + "order_status" => 0, + "status" => 0, + ); + if($i % 3 == 0) { + $vals['order_status'] = 1; + } + if($i % 5 == 0) { + $vals['order_status'] = 2; + } + $vals['status'] = $i % 5; + $data[] = $vals; + } + + $reture_data['data'] = $data; + $reture_data['total'] = 300000; + + $this->ajax_json(true, '', $reture_data); + } + + + } diff --git a/view/css/admin_style.css b/view/css/admin_style.css index f83ede9..f1d5d6f 100644 --- a/view/css/admin_style.css +++ b/view/css/admin_style.css @@ -463,4 +463,252 @@ body{ box-sizing: border-box; height: 325px; overflow: hidden; + } + .admin-container-outer .layui-table{ + width: 100% !important; + } + .deliver_remind_table .layui-table-main tr,.deliver_remind_table .layui-table th{ + height: 53px !important; + } + .deliver_remind_table .layui-table-main tr{ + font-size: 14px; + font-family: PingFangSC-Regular; + color: rgba(0,0,0,0.65); + } + .deliver_remind_table .layui-table tbody tr:hover{ + background-color: #FAFAFA; + } + .deliver-remind-body-right{ + padding: 0px 11px 11px 11px; + background-color: #FFFFFF; + } + + .deliver_remind_table .layui-table-view{ + margin-top:0px !important; + } + .deliver_remind_table .layui-table-header{ + border-radius: 4px 4px 0px 0px !important; + } + .deliver_remind_table .layui-table-header th{ + border: none !important; + font-size: 14px !important; + font-family: PingFangSC-Medium; + color: rgba(0,0,0) !important; + } + .deliver_remind_table .layui-table-view{ + border-radius: 4px 4px 0px 0px !important; + border: none !important; + } + .admin-table-list-header{ + width: 100%; + height: 52px; + overflow: hidden; + box-sizing: border-box; + padding-left: 19px; + padding-right: 10px; + } + .admin-table-list-header div{ + display: inline-block; + height: 100%; + line-height: 52px; + } + .admin-table-body{ + border-radius: 8px 8px 0px 0px; + } + .admin-table-list-header div:first-child span{ + font-size: 12px; + font-family: PingFangSC-Regular; + color: rgba(0,0,0, 0.65); + } + .admin-table-list-header div:nth-child(2) span{ + font-size: 16px; + font-family: PingFangSC-Medium; + color: rgba(0,0,0); + } + .admin-table-list-header div:nth-child(3){ + width: auto; + height: 32px; + padding: 0px 13px; + background: #1890FF; + border-radius: 2px; + line-height: 32px; + float: right; + margin-top:10px; + cursor: pointer; + } + .admin-table-list-header div:nth-child(3) span{ + font-size: 14px; + font-family: PingFangSC-Regular; + color: #FFFFFF; + } + .admin-table-td-outter{ + display: inline-block; + width: 100%; + height: 100%; + box-sizing: border-box; + position: absolute; + left: 0px; + top: 0px; + line-height: 53px; + padding-left: 15px; + cursor: pointer; + } + .deliver_remind_table .layui-table-cell{ + position: relative !important; + } + div[lay-id=deliver_remind_list] .layui-table-main tr td:nth-child(2) .layui-table-cell{ + padding: 0px !important; + height: 53px !important; + } + .deliver_remind_list_table_class .layui-table-main tr:hover > td:nth-child(-n+2){ + color:#1890FF !important; + } + .count_down_wait{ + color: #F21019; + position: relative; + cursor: pointer; + } + .count-down-class .layui-layer-content{ + width: 123px !important; + height: 34px !important; + font-size: 12px !important; + font-family: PingFangSC-Regular !important; + color: rgba(0,0,0,0.33) !important; + line-height: 17px !important; + text-align: center !important; + } + .remained_status{ + font-size: 14px; + font-family: PingFangSC-Regular; + color: #FC5057; + width: 100%; + height: 100%; + display: inline-block; + cursor: pointer; + } + .remained_status_wait{ + color: rgba(89, 89, 89, 1); + } + .admin-table-td-outter-font{ + display: none; + } + .deliver_remind_list_table_class .layui-table-main tr:hover .admin-table-td-outter-font{ + display: inline; + } + .admin-container-outer .layui-laypage-prev{ + min-width: 8px !important; + height: 32px !important; + background: #FFFFFF !important; + border-radius: 2px !important; + border: 1px solid #D9D9D9 !important; + position: relative; + margin-right: 8px; + padding: 0px 12px !important; + font-size: 14px !important; + } + .admin-container-outer .layui-table-pageview{ + float: right; + margin-top: 16px !important; + } + .admin-container-outer .layui-laypage-spr{ + margin-right: 8px !important; + } + .admin-container-outer .layui-laypage-curr{ + min-width: 8px !important; + height: 32px !important; + background: #1890FF !important; + border-radius: 2px !important; + margin-right: 8px !important; + line-height: 32px !important; + font-size: 14px !important; + } + .admin-container-outer .layui-table-pageview a{ + display: inline-block; + min-width: 8px !important; + height: 32px !important; + line-height: 32px !important; + background: #FFFFFF !important; + border-radius: 2px !important; + border: 1px solid #D9D9D9 !important; + margin-right: 8px !important; + font-size: 14px !important; + font-family: PingFangSC-Regular !important; + color: rgba(0,0,0,0.65) !important; + padding: 0px !important; + text-align: center; + padding: 0px 12px !important; + } + .admin-container-outer .layui-laypage-prev .layui-icon{ + position: absolute; + left: 8px; + top: 1px; + } + .admin-container-outer .layui-laypage-limits{ + width: 82px !important; + height: 32px !important; + background: #FFFFFF !important; + border-radius: 2px !important; + border: 1px solid #D9D9D9 !important; + box-sizing: border-box !important; + } + .admin-container-outer .layui-laypage-limits select{ + height: 100% !important; + width: 100% !important; + box-sizing: border-box; + pointer-events: none; + appearance:none; + width: 82px !important; + box-sizing: border-box !important; + padding-left: 12px !important; + } + .admin-container-outer .layui-laypage-skip{ + height: 32px !important; + box-sizing: border-box; + line-height: 32px !important; + font-size: 14px !important; + } + .admin-container-outer .layui-laypage-skip *{ + font-size: 14px !important; + font-family: PingFangSC-Regular !important; + color: rgba(0,0,0,0.65) !important; + } + .admin-container-outer .layui-laypage-skip .layui-input{ + height: 32px !important; + } + .admin-container-outer .layui-laypage-btn{ + height: 32px !important; + box-sizing: border-box; + line-height: 32px !important; + } + .admin-container-outer .layui-laypage-count{ + height: 32px !important; + box-sizing: border-box; + line-height: 32px !important; + font-size: 14px !important; + } + .admin-container-outer .layui-table-page{ + padding-right: 27px !important; + } + .list_status_grey01{ + color: rgba(0, 0, 0, 0.65); + font-size: 14px; + } + .list_status_yellow01{ + color: rgba(251, 131, 4, 1); + font-size: 14px; + } + .list_status_red01{ + color: rgba(249, 40, 39, 1); + font-size: 14px; + } + .list_status_green01{ + color: rgba(49, 185, 39, 1); + font-size: 14px; + } + .list_status_grey02{ + color: rgba(89, 89, 89, 1); + font-size: 14px; + } + .admin-container-outer .layui-laypage .layui-laypage-curr .layui-laypage-em{ + background-color: rgba(24, 144, 255, 1) !important; } \ No newline at end of file diff --git a/view/templates/include/admin_leftmenu.html b/view/templates/include/admin_leftmenu.html index b938b81..4e0801d 100644 --- a/view/templates/include/admin_leftmenu.html +++ b/view/templates/include/admin_leftmenu.html @@ -32,15 +32,15 @@ 发货提醒 </a> </dd> - <dd> - <a href="javascript:;" class="admin-layui-nav-item-a admin-layui-nav-item-a-child"> + <dd class="{if $menu_page == 'sale_monitor'}layui-this{/if}"> + <a href="{if $menu_page == 'sale_monitor'}javascript:;{else}/tpl/sale_monitor{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child"> <span class="icon--6 admin-no-select menu-left-icon-img menu-left-icon-img-16"></span> <span class="icon--6-2 admin-select menu-left-icon-img menu-left-icon-img-16"></span> 售后监控 </a> </dd> - <dd> - <a href="javascript:;" class="admin-layui-nav-item-a admin-layui-nav-item-a-child"> + <dd class="{if $menu_page == 'order_list'}layui-this{/if}"> + <a href="{if $menu_page == 'order_list'}javascript:;{else}/tpl/order_list{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child"> <span class="icon-dingd admin-no-select menu-left-icon-img"></span> <span class="icon-dingd1 admin-select menu-left-icon-img"></span> 订单列表 diff --git a/view/templates/tpl/deliver_remind.html b/view/templates/tpl/deliver_remind.html index 0f59b39..c725e00 100644 --- a/view/templates/tpl/deliver_remind.html +++ b/view/templates/tpl/deliver_remind.html @@ -17,139 +17,6 @@ <![endif]--> {literal} <style> - .admin-container-outer .layui-table{ - width: 100% !important; - } - .deliver_remind_table .layui-table-main tr,.deliver_remind_table .layui-table th{ - height: 53px !important; - } - .deliver_remind_table .layui-table-main tr{ - font-size: 14px; - font-family: PingFangSC-Regular; - color: rgba(0,0,0,0.65); - } - .deliver_remind_table .layui-table tbody tr:hover{ - background-color: #FAFAFA; - } - .deliver-remind-body-right{ - padding: 0px 11px 11px 11px; - background-color: #FFFFFF; - } - - .deliver_remind_table .layui-table-view{ - margin-top:0px !important; - } - .deliver_remind_table .layui-table-header{ - border-radius: 4px 4px 0px 0px !important; - } - .deliver_remind_table .layui-table-header th{ - border: none !important; - font-size: 14px !important; - font-family: PingFangSC-Medium; - color: rgba(0,0,0) !important; - } - .deliver_remind_table .layui-table-view{ - border-radius: 4px 4px 0px 0px !important; - border-top: none !important; - border-left: none !important; - border-right: none !important; - } - .admin-table-list-header{ - width: 100%; - height: 52px; - overflow: hidden; - box-sizing: border-box; - padding-left: 19px; - padding-right: 10px; - } - .admin-table-list-header div{ - display: inline-block; - height: 100%; - line-height: 52px; - } - .admin-table-body{ - border-radius: 8px 8px 0px 0px; - } - .admin-table-list-header div:first-child span{ - font-size: 12px; - font-family: PingFangSC-Regular; - color: rgba(0,0,0, 0.65); - } - .admin-table-list-header div:nth-child(2) span{ - font-size: 16px; - font-family: PingFangSC-Medium; - color: rgba(0,0,0); - } - .admin-table-list-header div:nth-child(3){ - width: auto; - height: 32px; - padding: 0px 13px; - background: #1890FF; - border-radius: 2px; - line-height: 32px; - float: right; - margin-top:10px; - cursor: pointer; - } - .admin-table-list-header div:nth-child(3) span{ - font-size: 14px; - font-family: PingFangSC-Regular; - color: #FFFFFF; - } - .admin-table-td-outter{ - display: inline-block; - width: 100%; - height: 100%; - box-sizing: border-box; - position: absolute; - left: 0px; - top: 0px; - line-height: 53px; - padding-left: 15px; - cursor: pointer; - } - .deliver_remind_table .layui-table-cell{ - position: relative !important; - } - div[lay-id=deliver_remind_list] .layui-table-main tr td:nth-child(2) .layui-table-cell{ - padding: 0px !important; - height: 53px !important; - } - .deliver_remind_list_table_class .layui-table-main tr:hover > td:nth-child(-n+2){ - color:#1890FF !important; - } - .count_down_wait{ - color: #F21019; - position: relative; - cursor: pointer; - } - .count-down-class .layui-layer-content{ - width: 123px !important; - height: 34px !important; - font-size: 12px !important; - font-family: PingFangSC-Regular !important; - color: rgba(0,0,0,0.33) !important; - line-height: 17px !important; - text-align: center !important; - } - .remained_status{ - font-size: 14px; - font-family: PingFangSC-Regular; - color: #FC5057; - width: 100%; - height: 100%; - display: inline-block; - cursor: pointer; - } - .remained_status_wait{ - color: rgba(89, 89, 89, 1); - } - .admin-table-td-outter-font{ - display: none; - } - .deliver_remind_list_table_class .layui-table-main tr:hover .admin-table-td-outter-font{ - display: inline; - } </style> {/literal} </head> @@ -203,7 +70,7 @@ layui.use(['element', 'layer', 'util', 'table'], function(){ var showTips = null; table.render({ elem: '#deliver_remind_list' - ,url:'/tpl/ajax_get_order_list' + ,url:'/tpl/ajax_get_deliver_remind_list' ,toolbar: false ,title: '用户数据表' ,totalRow: false @@ -284,19 +151,6 @@ layui.use(['element', 'layer', 'util', 'table'], function(){ } } }); - - table.on('tool(deliver-remind-table)', function(obj){ - // if(obj.event == 'copyTid'){ - // $(".admin-table-td-outter").attr("data-clipboard-text",obj.data.tid); - // var clipboard = new ClipboardJS('.admin-table-td-outter'); - // clipboard.on('success', function(e) { - // layer.msg('复制成功'); - // clipboard.destroy(); - // e.clearSelection(); - // }); - // } - // console.log(obj.event) - }); }); diff --git a/view/templates/tpl/order_list.html b/view/templates/tpl/order_list.html new file mode 100644 index 0000000..c4544a9 --- /dev/null +++ b/view/templates/tpl/order_list.html @@ -0,0 +1,133 @@ + +<!DOCTYPE html> +<html> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link href="/images/pdd_icon.png" rel="icon"> + <title>首页</title> + <link rel="stylesheet" href="/css/layui.css"/> + <link rel="stylesheet" href="/css/admin_style.css"/> + <link rel="stylesheet" href="/css/common.css"/> + <script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + {literal} + <style> + </style> + {/literal} +</head> +<body> +<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table"> + {include file="include/admin_header.html"} + {include file="include/admin_leftmenu.html"} + <div class="layui-body admin-layui-body layui-anim layui-anim-fadein"> + <div class="layui-row"> + <div class="layui-col-md12 deliver-remind-body-right admin-table-body"> + <div class="admin-table-list-header"> + <div><span>订单列表/</span></div> + <div><span>订单列表</span></div> + <div><span>导出列表</span></div> + </div> + <table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table> + </div> + </div> + + </div> +</div> +<script src="/js/layui.js"></script> +<script src="/js/clipboard.min.js"></script> +{literal} +<script> +layui.use(['element', 'layer', 'util', 'table'], function(){ + var element = layui.element + ,layer = layui.layer + ,util = layui.util + ,table = layui.table + ,$ = layui.$; + + util.event('lay-header-event', { + menuLeft: function(othis){ + layer.msg('展开左侧菜单的操作', {icon: 0}); + } + ,menuRight: function(){ + layer.open({ + type: 1 + ,title: '更多' + ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>' + ,area: ['260px', '100%'] + ,offset: 'rt' + ,anim: 5 + ,shadeClose: true + ,scrollbar: false + }); + } + }); + + var showTips = null; + table.render({ + elem: '#deliver_remind_list' + ,url:'/tpl/ajax_get_order_list' + ,toolbar: false + ,title: '用户数据表' + ,totalRow: false + ,className:'deliver_remind_list_table_class' + ,cols: [[ + {field:'goods_name', title:'商品名称'} + ,{field:'tid', title:'订单号' + ,templet: function(d){ + return '<span data-clipboard-text="'+d.tid+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.tid+'">'+ d.tid +' <span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.tid+'"></span></span>'; + }} + ,{field:'count_down', title:'售后时间' + ,templet: function(d){ + return '<span>'+d.sale_date+'</span>'; + }} + ,{field:'income', title:'收入(元)'} + ,{field:'order_status', title:'订单状态' + ,templet: function(d){ + if(d.order_status == 1) return '<span class="list_status_grey01">已签收</span>'; + return '<span class="list_status_yellow01">待签收</span>'; + }} + ,{field:'sale_status', title:'售后状态' + ,templet: function(d){ + if(d.sale_status == 1) return '<span class="list_status_red01">退款中</span>'; + if(d.sale_status == 2) return '<span class="list_status_green01">退款成功</span>'; + return '<span class="list_status_grey02">无售后</span>'; + }} + ]] + ,page: true + ,response: { + statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0 + } + ,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据 + return { + "code": 200, //解析接口状态 + "msg": res.info, //解析提示文本 + "count": res.data.total, //解析数据长度 + "data": res.data.data //解析数据列表 + }; + }, + done: function(res, curr, count){ + var data = res.data; + for(var i=0; i<data.length; i++){ + + var tid = data[i].tid; + var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid); + clipboard.on('success', function(e) { + layer.msg('复制成功', {time:1500}); + clipboard.destroy(); + e.clearSelection(); + }); + } + } + }); +}); + + +</script> +{/literal} +</body> +</html> diff --git a/view/templates/tpl/sale_monitor.html b/view/templates/tpl/sale_monitor.html new file mode 100644 index 0000000..158df39 --- /dev/null +++ b/view/templates/tpl/sale_monitor.html @@ -0,0 +1,141 @@ + +<!DOCTYPE html> +<html> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link href="/images/pdd_icon.png" rel="icon"> + <title>首页</title> + <link rel="stylesheet" href="/css/layui.css"/> + <link rel="stylesheet" href="/css/admin_style.css"/> + <link rel="stylesheet" href="/css/common.css"/> + <script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + {literal} + <style> + </style> + {/literal} +</head> +<body> +<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table"> + {include file="include/admin_header.html"} + {include file="include/admin_leftmenu.html"} + <div class="layui-body admin-layui-body layui-anim layui-anim-fadein"> + <div class="layui-row"> + <div class="layui-col-md12 deliver-remind-body-right admin-table-body"> + <div class="admin-table-list-header"> + <div><span>售后监控/</span></div> + <div><span>售后列表</span></div> + <div><span>导出列表</span></div> + </div> + <table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table> + </div> + </div> + + </div> +</div> +<script src="/js/layui.js"></script> +<script src="/js/clipboard.min.js"></script> +{literal} +<script> +layui.use(['element', 'layer', 'util', 'table'], function(){ + var element = layui.element + ,layer = layui.layer + ,util = layui.util + ,table = layui.table + ,$ = layui.$; + + util.event('lay-header-event', { + menuLeft: function(othis){ + layer.msg('展开左侧菜单的操作', {icon: 0}); + } + ,menuRight: function(){ + layer.open({ + type: 1 + ,title: '更多' + ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>' + ,area: ['260px', '100%'] + ,offset: 'rt' + ,anim: 5 + ,shadeClose: true + ,scrollbar: false + }); + } + }); + + var showTips = null; + table.render({ + elem: '#deliver_remind_list' + ,url:'/tpl/ajax_sale_monitor_list' + ,toolbar: false + ,title: '用户数据表' + ,totalRow: false + ,className:'deliver_remind_list_table_class' + ,cols: [[ + {field:'goods_name', title:'商品名称'} + ,{field:'tid', title:'订单号' + ,templet: function(d){ + return '<span data-clipboard-text="'+d.tid+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.tid+'">'+ d.tid +' <span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.tid+'"></span></span>'; + }} + ,{field:'count_down', title:'售后时间' + ,templet: function(d){ + return '<span>'+d.sale_date+'</span>'; + }} + ,{field:'income', title:'收入(元)'} + ,{field:'order_status', title:'订单状态' + ,templet: function(d){ + if(d.order_status == 1) return '<span class="list_status_grey01">待发货</span>'; + if(d.order_status == 2) return '<span class="list_status_yellow01">已签收</span>'; + return '<span class="list_status_red01">待签收</span>'; + }} + ,{field:'status', title:'状态' + ,templet: function(d){ + if(d.status == 1) return '<span class="list_status_grey02">退款中</span>'; + if(d.status == 2) return '<span class="list_status_grey02">补寄中</span>'; + if(d.status == 3) return '<span class="list_status_grey02">待补寄</span>'; + if(d.status == 4) return '<span class="list_status_grey02">待签收</span>'; + if(d.status == 5) return '<span class="list_status_grey02">平台…</span>'; + return '<span class="list_status_yellow01">待处理</span>'; + }} + ,{field:'option', title:'操作' + ,templet: function(d){ + return '<span style="color:rgba(61, 127, 255, 1);font-size: 14px;cursor: pointer;">处理</span>'; + }} + ]] + ,page: true + ,response: { + statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0 + } + ,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据 + return { + "code": 200, //解析接口状态 + "msg": res.info, //解析提示文本 + "count": res.data.total, //解析数据长度 + "data": res.data.data //解析数据列表 + }; + }, + done: function(res, curr, count){ + var data = res.data; + for(var i=0; i<data.length; i++){ + + var tid = data[i].tid; + var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid); + clipboard.on('success', function(e) { + layer.msg('复制成功', {time:1500}); + clipboard.destroy(); + e.clearSelection(); + }); + } + } + }); +}); + + +</script> +{/literal} +</body> +</html>