设备消息功能需要获取设备sn码。
wx.requestSubscribeDeviceMessage({
sn: 'xxxx',
snTicket: 'xxxxx',
modelId: 'xxxxx',
tmplIds: ['xxxxx'],
success(res) {
console.log('[wx.requestSubscribeDeviceMessage success]: ', res)
// { 'QCpBsp1TGJ1ML-UIwAIMkdXpPGzxSfwJqsKsvMVs3io': 'accept' }
},
fail(res) {
console.log('[wx.requestSubscribeDeviceMessage fail]: ', res)
}
})
x小程序如何获取sn码
不能的