時(shí)間: 2024-06-20 13:01:10 人氣: -
小程序的客服系統(tǒng),是微信做的非常成功的一個(gè)功能,開發(fā)者可以很方便的通過(guò)一行代碼,就可實(shí)現(xiàn)客服功能。
1. 普通客服按鈕添加
1
|
<button open-type= 'contact' session-from= '' >客服-聯(lián)系我們</button> |
2. 懸浮客服按鈕添加,圖片自定義
大家看地圖的有個(gè)客服圖片圖片資源。大家去iconfont 網(wǎng)站去找一個(gè)就可以了
index.wxml
<button class="kf_button" open-type="contact" session-from="weapp">
<image class="kf_image" src="../../resources/img/kf.PNG"></image>
</button>
index.wxss
.kf_button{
background-color: rgba(255, 255, 255, 0);
border: 0px;
height: 100rpx;
right: 0;
bottom: 20rpx;
position: fixed;
}
.kf_button::after{
border: 0px;
}
.kf_image{
z-index: 9999;
width: 100rpx;
height: 100rpx;
}