- wx.onHCEMessage无法触发
Page({ /** * 页面的初始数据 */ data: { text:'' }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { var _this=this wx.getHCEState({ success (res) { console.log(res.errCode,'1') if(res.errCode == 0){ wx.startHCE({ aid_list:['F222222222'], success (res) { console.log(res.errCode,'2') if(res.errCode == 0){ console.log(res.errCode,'2.1') wx.onHCEMessage(function(res) { console.log(res,res.errCode,'3') if (res.messageType === 1) { const buffer = new ArrayBuffer(111) const dataView = new DataView(buffer) dataView.setUint8(0, 0) wx.sendHCEMessage({ data: buffer, success:function(res){ console.log(res.errCode,'4') _this.setData({ text:res }) console.log(res,'success') }, fail:function(res){ _this.setData({ text:res }) console.log(res,'fail') } }) } }) } },fail(res){ console.log(res,'fail0') } }) } } }) } })
2023-02-18 - 微信小程序开发流量主,怎么能获取到每个用户查看的广告的收益?
如何查看每一个微信用户,在我开发的小程序中浏览广告所生成的收益
2022-11-30