微信的通知服务
var access_token = await wepy.request({
url: `https:
method: 'GET',
header: { 'content-type': 'application/json' }
})
var sendMsg = await wepy.request({
url: `https:
.data.access_token}`,
method: 'POST',
header: { 'content-type': 'application/json' },
data: {
touser: openid,
template_id: '模板id在控制台获取',
page: 'pages/setting/manage-address-page',
form_id: prepay_id,
data: {
keyword1: '123',
keyword2: 'LION '
}
}
})
微信的客服服务
<contact-button
type="default-light"
size="20"
session-from="weapp"
>
</contact-button>
微信管理平台设置后台客服的微信, 消息会自动推送到指定的微信
微信自带弹框
wx.showModal({
title: '确认收货?',
confirmText: '确认',
confirmColor: '#ffde00',
success: function(res) {
if (res.confirm) {
changeOrderStatus(e.currentTarget.id, 4).then(res => {
this.toDoWhatUShouldDo(e, 4)
})
} else if (res.cancel) {
console.log('用户点击取消收货')
}
},
fail: function() {}
})