Home > Web Front-end > JS Tutorial > How to add a customer service button to the WeChat mini program

How to add a customer service button to the WeChat mini program

php中世界最好的语言
Release: 2018-06-01 17:39:59
Original
4148 people have browsed it

This time I will show you how to add a customer service button to the WeChat mini program and what are the precautions for adding a customer service button to the WeChat mini program. The following is a practical case, let's take a look.

1. Add a normal customer service button

 <button open-type=&#39;contact&#39; session-from=&#39;&#39;>客服-联系我们</button>
Copy after login

##2. Add a floating customer service button and customize the picture

If you look at the map, there is a customer service picture resource. Just 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>
Copy after login

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;
}
Copy after login

I believe you have mastered the method after reading the case in this article, and there will be more exciting things. Please pay attention to other related articles on php Chinese website!

Recommended reading:

How to make vue-baidu-map to enter the page and automatically locate it


How to use Vue2.0 Call the camera to take pictures

The above is the detailed content of How to add a customer service button to the WeChat mini program. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template