<button open-type="contact" bindcontact="handleContact"></button>
Page({
handleContact (e) {
console.log(e.detail.path)
console.log(e.detail.query)
}
})
方法一:在商品详情里面点击客服的时候,跳转到客服界面,有点类似分享商品出来然后咨询
<button open-type="contact" send-message-title="{{itemName}}"
send-message-path="/pages/detail/detail?itemId={{itemId}}"
sendMessageTitle="{{itemName}}" show-message-card class='detailContact'>
<view>
<image src="../imgs/kefu_hui.png" class='footer-img'></image>
<view style='font-size:20rpx;text-align:center;color:#666'>客服</view>
</view>
</button>
方法二:
<button open-type="contact" class='contact' wx:if="{{item.cKey=='Feedback'}}">
<template is="cell" data="{{src:'../imgs/kefu.png',text:'联系客服'}}" />
</button>
方法三:样式已经固定
<contact-button></contact-button>
问题一: 小程序客服(包括网页端和移动端)接收不到客户消息
解决方法:
确认【消息推送】是否被开启。
是否授权给了第三方平台。(在mp-设置-第三方设置-第三方平台授权管理)
传参
<button open-type='contact' session-from="{{data}}">
消息会发到你后台配置的地址里 这个参数就在里面。后台的设置=》开发设置=》消息推送设置