微信小程序添加客服接口

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39702981/article/details/86546650

微信小程序添加客服接口

场景:

电商应用中充当客服角色,针对某一款商品咨询服务

看了眼文档

https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/customer-message/receive.html

添加了一个客服按钮

方法一:

<contact-button class="button-image" size="22" >
联系客服
</contact-button>

方法二:

<button class='contact-btn' open-type='contact'>a</button> 

wxml

<view class='weui-cells weui_cells-after-title'>
      <view class='weui-cell'>
        <view class="weui-cell__bd">联系我们</view>
        <view class="weui-cell__ft weui-cell__ft_in-access"></view> 
        <button class='contact-btn' open-type='contact'>a</button> 
      </view>
</view>

wxss

.contact-btn {
  display: inline-block;
  position: absolute;
  width: 100%;
  background: salmon;
    opacity: 0;
}

然后在小程序微信平台设置

猜你喜欢

转载自blog.csdn.net/qq_39702981/article/details/86546650