Add a customer service button contact-button to the applet

The customer service system of the applet is a very successful function of WeChat. Developers can easily implement the customer service function through a single line of code.

1. General customer service button added

<button open-type= ' contact ' session- from = '' >Customer Service-Contact Us</button>

2. Floating customer service button added, picture customization

 

Everyone looking at the map has a picture resource of customer service pictures. You can go to the iconfont website to find one

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;
}

 

Sesame small customer service applet pays attention to the public account's e-commerce multi-customer service system http://xiaokefu.hotapp.cn

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324898219&siteId=291194637