// pages/obj_order_base/obj_order_base.jsPage({  /**   * 页面的初始数据   */  data: {    order_name:"订单编号:",    order_ids:"21435643645765867879"  },    })  },    // 一键复制事件  copyBtn: function (e) {    var that = this;    wx.setClipboardData({     //准备复制的数据      data: that.data.order_name + that.data.order_ids,      success: function (res) {        wx.showToast({          title: '复制成功',        });      }    });  },})!-- 最外层视图page --view class='page'!-- 标签名称 --view class='conents_lab'label class='shop_left'{{order_name}}text selectable='true' bindlongtap='copy'{{order_ids}}/text/label/view!-- 复制 --label class='lab_copy' bindtap='copyBtn'复制/label/view

 

TAG标签: 微信小程序点击按钮

http://www.xiaochengxub.com/read-103020.html