Commit 34c8694b by 谢中龙

增加复制功能

parent 508f25c2
......@@ -28,6 +28,21 @@ wxService.page({
},
//复制
onTapCopy(e){
let value = e.currentTarget.dataset.value;
wx.setClipboardData({
//准备复制的数据
data: value,
success: function (res) {
wx.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
//获取购买记录
getBuyRecordsList(refresh){
const { memberId } = wx.getStorageSync('_baseUserInfo');
......
......@@ -7,7 +7,8 @@
wx:key="*this">
<view class='records-item-lf'>
<view class='records-title'>{{item.activityName}}</view>
<view class="records-desc">超值卡号:{{item.supValCardId}}</view>
<view class="records-desc">超值卡号:{{item.supValCardId}}
<text class="copy" data-value="{{item.supValCardId}}" bindtap="onTapCopy">复制</text> </view>
<view class="records-desc">购买时间:{{item.payOrderTime}}</view>
<view class="records-desc">有效时间:{{item.startTime}} 至 {{item.endTime}}</view>
</view>
......
......@@ -52,7 +52,24 @@ view{
.records-desc{
font-size: 24rpx;
color: #999999;
margin-bottom: 4rpx;
margin-bottom: 8rpx;
display: flex;
align-items: center;
}
.records-desc .copy{
display: block;
font-size: 22rpx;
padding: 2rpx 10rpx;
border: solid 1rpx #ff2222;
color: #ff2222;
border-radius: 4rpx;
margin-left: 10rpx;
}
.records-desc .copy:active{
opacity: 0.7;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment