1、注册微信小程序绑定客服
添加客服完,还需扫码绑定才能接收对应的信息
2、开发使用Button组件
<button open-type="contact">联系客服</button>
界面:
解决:在这个列表上点击联系客服,因为要实现,需要用组件,又想保留原来的样式
<view class="row">
<view class="left">
<uni-icons type="chatboxes-filled" size="20" color="#28b389"></uni-icons>
<text class="text">
联系客服
</text>
</view>
<view class="right">
<text class="text">
</text>
<uni-icons type="right" size="16" color="#aaa"></uni-icons>
</view>
<button open-type="contact">联系客服</button>
</view>
.row{
padding: 0 30rpx;
display: flex;
height: 100rpx;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
position: relative;
button{
position: absolute;
top: 0;
left: 0;
height: 100rpx;
width: 100%;
opacity: 0;
}
.left{
display: flex;
align-items: center;
.text{
padding-left: 20rpx;
color: #666;
}
}
.right{
display: flex;
align-items: center;
.text{
color: #aaa;
font-size: 28;
}
}
&:last-child{
border-bottom: 0;
}
}
3、给盒子加一个定位,并且透明度给0
opacity: 0;