Sfoglia il codice sorgente

核销记录复制订单号

kk.shi 3 anni fa
parent
commit
ef145040c8

+ 10 - 0
pages/welfareMall/writeOff/writeOff.js

@@ -254,4 +254,14 @@ userstoreListView: function(data) {
     })
     this.getHexiaoList();
   },
+  
+  toCopy: function(e){
+    let orderSn = e.currentTarget.dataset.ordersn
+    wx.setClipboardData({
+      data: orderSn,
+      success: function (res) {
+       console.log(orderSn)
+      }
+      })
+  }
 })

+ 1 - 1
pages/welfareMall/writeOff/writeOff.wxml

@@ -36,7 +36,7 @@
     <view class="content-head flex-row">
       <view class="flex-row">
         <view class="content-head-date">订单号 {{item.orderSn}}</view>
-        <view class="content-head-copy">复制</view>
+        <view class="content-head-copy" data-ordersn="{{item.orderSn}}" catchtap="toCopy">复制</view>
       </view>
       <view class="content-head-state">{{item.statusText}}</view>
     </view>