wx.setClipboardData({ data: ‘这是要复制的文字‘, success: function (res) { wx.showModal({ title: ‘提示‘, content: ‘复制成功‘, showCancel: false }); } })
copy(){ wx.setClipboardData({ data: this.order.orderCode, success: function (res) { wx.getClipboardData({ success: function (res) { wx.showToast({ title: ‘复制成功‘ }) } }) } }) },
copyText(e){ api.me.createCode().then(data => { console.log(‘创建邀请码‘, data) this.count++ this.list.unshift(data.code) wx.setClipboardData({ data: data.code.inviteCode, success: function (res) { wx.getClipboardData({ success: function (res) { wx.showToast({ title: ‘复制成功‘ }) } }) } }) }) },