From 9611711d0aaa383ddd6a22ad9a1e8b5cb58e881c Mon Sep 17 00:00:00 2001
From: Jason <1432334894@qq.com>
Date: Thu, 4 Aug 2022 10:16:47 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=97=E8=A1=A8=E6=9C=80?=
 =?UTF-8?q?=E5=90=8E=E4=B8=80=E8=A1=8C=E8=AE=A2=E5=8D=95=E5=8F=B7=E7=82=B9?=
 =?UTF-8?q?=E5=87=BB=E5=A4=8D=E5=88=B6=E5=90=8E=E6=97=A0=E6=B3=95=E5=86=8D?=
 =?UTF-8?q?=E6=AC=A1=E7=82=B9=E5=87=BB=E5=A4=8D=E5=88=B6=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 view/templates/index/after_sale_list.html   |  6 ++++--
 view/templates/index/order_list.html        |  6 ++++--
 view/templates/index/wait_deliver_list.html | 23 +++++++++++++++++++----
 3 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/view/templates/index/after_sale_list.html b/view/templates/index/after_sale_list.html
index b3e1154..c643b4a 100644
--- a/view/templates/index/after_sale_list.html
+++ b/view/templates/index/after_sale_list.html
@@ -163,8 +163,10 @@ layui.use(['element', 'layer', 'util', 'table'], function(){
         var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
         clipboard.on('success', function(e) {
           layer.msg('复制成功', {time:1500});
-          clipboard.destroy();
-          e.clearSelection();
+          if(i < (data.length-2)){
+            clipboard.destroy();
+            e.clearSelection();
+          }
         });
       }
     }
diff --git a/view/templates/index/order_list.html b/view/templates/index/order_list.html
index 64596d4..28c5364 100644
--- a/view/templates/index/order_list.html
+++ b/view/templates/index/order_list.html
@@ -153,8 +153,10 @@ layui.use(['element', 'layer', 'util', 'table'], function(){
         var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
         clipboard.on('success', function(e) {
           layer.msg('复制成功', {time:1500});
-          clipboard.destroy();
-          e.clearSelection();
+          if(i < (data.length-2)){
+            clipboard.destroy();
+            e.clearSelection();
+          }
         });
       }
     }
diff --git a/view/templates/index/wait_deliver_list.html b/view/templates/index/wait_deliver_list.html
index ee80fd8..c5e207c 100644
--- a/view/templates/index/wait_deliver_list.html
+++ b/view/templates/index/wait_deliver_list.html
@@ -31,6 +31,7 @@
           <div><span>待发货列表</span></div>
           <div><a href="/index/export_wait_deliver_goods_tids"><span>导出待发货列表</span></a></div>
         </div>
+        <div id="test"></div>
         <table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table>
         <div class="admin-blank-table">
           <img src="/images/blank_table.png" alt="">
@@ -38,7 +39,6 @@
         </div>
       </div>
     </div>
-
   </div>
 </div>
 <script src="/js/layui.js"></script>
@@ -52,6 +52,15 @@ layui.use(['element', 'layer', 'util', 'table'], function(){
   ,table = layui.table
   ,$ = layui.$;
 
+   //示例
+   var endTime = new Date(2099,1,1).getTime() //假设为结束日期
+  ,serverTime = new Date().getTime(); //假设为当前服务器时间,这里采用的是本地时间,实际使用一般是取服务端的
+
+  util.countdown(endTime, serverTime, function(date, serverTime, timer){
+    var str = (date[0]*24 + date[1]) + ':' +  date[2] + ':' + date[3];
+    layui.$('#test').html('倒计时:'+ str);
+  });
+
   util.event('lay-header-event', {
     menuLeft: function(othis){
       var btn = $("#leftEnumIcon");
@@ -145,13 +154,19 @@ layui.use(['element', 'layer', 'util', 'table'], function(){
       }
 
       for(var i=0; i<data.length; i++){
-
         var tid = data[i].order_sn;
         var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
         clipboard.on('success', function(e) {
           layer.msg('复制成功', {time:1500});
-          clipboard.destroy();
-          e.clearSelection();
+          if(i < (data.length-2)){
+            clipboard.destroy();
+            e.clearSelection();
+          }
+        });
+
+        clipboard.on('error', function(e) {
+            console.error('Action:', e.action);
+            console.error('Trigger:', e.trigger);
         });
 
         if(data[i].is_show_count_down == true){