瀏覽代碼

Merge branch 'hotfix/修复清空剪贴板' of Software/android-cloud-H5 into develop

zengzhixiang 2 年之前
父節點
當前提交
c46be19efb
共有 3 個文件被更改,包括 2092 次插入14 次删除
  1. 20 7
      static/screenAndroid/WXtrialInterface.html
  2. 18 7
      static/screenIos/WXtrialInterface.html
  3. 2054 0
      static/static/lib/qs.js

+ 20 - 7
static/screenAndroid/WXtrialInterface.html

@@ -42,7 +42,10 @@
       rel="stylesheet"
       href="https://cdn.bootcss.com/jquery-weui/1.2.1/css/jquery-weui.min.css"
     />
+    <!-- <link rel="stylesheet" href="../static/lib/swiper/swiper-bundle.min.css" />
+    <script src="../static/lib/swiper/swiper-bundle.js"></script> -->
     <script src="../static/lib/doT-1.1.3/doT.min.js"></script>
+    <script src="../static/lib/qs.js"></script>
   </head>
 
   <body class="scroll h-player" style="overscroll-behavior: contain">
@@ -67,7 +70,7 @@
       </div>
       <div class="slide-wrapper-content">
         {{~ it :item:index }}
-        <div class="slide-wrapper">
+        <div class="slide-wrapper" data-id="{{= item.id}}">
           <div class="slide-scroll animate-slide-start">
             <div
               class="slide-content"
@@ -964,14 +967,24 @@
       }
       // 清空剪贴板
       function handleClear() {
-        var ids = '';
-        cutList.forEach(function (item) {
-          ids += 'ids=' + item.id + '&';
-        });
-        ids = ids.substring(0, ids.lastIndexOf('&'));
+        // var ids = '';
+        // cutList.forEach(function (item) {
+        //   ids += 'ids=' + item.id + '&';
+        // });
+
+        // ids = ids.substring(0, ids.lastIndexOf('&'));
+
         $.confirm('确定清空剪贴板?', function () {
           $.ajax({
-            url: baseUrl + '/api/public/v5/shear/content?' + ids,
+            url:
+              baseUrl +
+              '/api/public/v5/shear/content' +
+              Qs.stringify(
+                {
+                  ids: Array.from($('.slide-wrapper')).map((v) => v.dataset.id),
+                },
+                { arrayFormat: 'repeat', addQueryPrefix: true },
+              ),
             headers: {
               Authorization: token,
             },

+ 18 - 7
static/screenIos/WXtrialInterface.html

@@ -46,6 +46,7 @@
     <!-- <link rel="stylesheet" href="../static/lib/swiper/swiper-bundle.min.css" />
     <script src="../static/lib/swiper/swiper-bundle.js"></script> -->
     <script src="../static/lib/doT-1.1.3/doT.min.js"></script>
+    <script src="../static/lib/qs.js"></script>
   </head>
 
   <body class="scroll h-player" style="overscroll-behavior: contain">
@@ -70,7 +71,7 @@
       </div>
       <div class="slide-wrapper-content">
         {{~ it :item:index }}
-        <div class="slide-wrapper">
+        <div class="slide-wrapper" data-id="{{= item.id}}">
           <div class="slide-scroll animate-slide-start">
             <div
               class="slide-content"
@@ -683,14 +684,24 @@
       }
       // 清空剪贴板
       function handleClear() {
-        var ids = '';
-        cutList.forEach(function (item) {
-          ids += 'ids=' + item.id + '&';
-        });
-        ids = ids.substring(0, ids.lastIndexOf('&'));
+        // var ids = '';
+        // cutList.forEach(function (item) {
+        //   ids += 'ids=' + item.id + '&';
+        // });
+
+        // ids = ids.substring(0, ids.lastIndexOf('&'));
+
         $.confirm('确定清空剪贴板?', function () {
           $.ajax({
-            url: baseUrl + '/api/public/v5/shear/content?' + ids,
+            url:
+              baseUrl +
+              '/api/public/v5/shear/content' +
+              Qs.stringify(
+                {
+                  ids: Array.from($('.slide-wrapper')).map((v) => v.dataset.id),
+                },
+                { arrayFormat: 'repeat', addQueryPrefix: true },
+              ),
             headers: {
               Authorization: token,
             },

File diff suppressed because it is too large
+ 2054 - 0
static/static/lib/qs.js