.trans{
height: 100%;
width: 100%;
overflow: hidden;
position: fixed;
bottom: 0;
background: #000;
opacity: 0.5;
z-index: 999;
}
<view class=“trans” wx:if="{{shade}}" bindtap=“noneshade” catchtouchmove=“ture”></view>
noneshade: function () {
this.setData({
trans: false,
trans1: false,
asd: false,
canvasImgShow: false,
shade:false
})
},
这是这遮挡层
<view class=“add” wx:if="{{asd}}">
<view class=“add1” bindtap=“copyqq”>
<image class=“wx” src="…/image/btn_QQ.png"></image>
<view class=“a-text”>复制QQ号</view>
</view>
<view class=“add1” bindtap=“copywx”>
<image class=“qq” src="…/image/btn_v.png"></image>
<view class=“a-text”>复制微信号</view>
</view>
<view class=“add1” bindtap=“addPhoneContact”>
<image class=“qq” src="…/image/[email protected]"></image>
<view class=“a-text”>同步通讯录</view>
</view>
</view>
.add{
width:525rpx;
height:275rpx;
background:#fff;
position:fixed;
font-size:24rpx;
top:40%;
left:15%;
display:flex;
color:#fff;
z-index:999999 !important;
text-align:center;
border-radius:10rpx;
}
// 加好友
add : function(e){
this.setData({
shades:true,
asd: true
})
},
这是显示层