- 小程序多列选择器在js中setData后不显示,但是在data中写死就可以显示,什么原因?
在data中写死控制台输出的是这样的数组[图片] 然后在js里面setData输出后是这个[图片] 这两个里面的值都是一样的 就是数组不展开的时候一个是空的,一个是显示长度的 [图片] 我就搞不明白是什么原因?不都是数组吗
2020-11-24 - 关于获取openid时同时刷新access_token,导致调用次数达到上限
https://api.weixin.qq.com/sns/oauth2/access_token 用户公众号页面就调用这个接口获取openid的,我要通过openid在我的后台匹配用户信息。这就导致每进一次页面就调用一次接口,每天2000次的限制导致我这根本就不能正常的线上运行。 还有支付的时候也要用户的openid,每次支付都要获取。2000次根本就不够用。怎样能只获取openid不刷新access_token? 求解!!!!!!!!!!!!!!!!!!
2020-11-19 - 蓝牙api用朋友的手机点击五次确定以后就不搜索了?
流程是这样的:搜索到设备关闭搜索关闭蓝牙连接然后弹框,点击确定以后继续调用这个方法开启搜索,我的两个手机测试的都没问题,朋友的手机点五次弹框以后就不搜索了,这是什么bug 代码片段: lanya() { let that = this wx.openBluetoothAdapter({ success: function (res) { console.log(res) //开始搜索蓝牙 wx.startBluetoothDevicesDiscovery({ success: function (res) { console.log('search', res) wx.onBluetoothDeviceFound(function (devices) { console.log('发现设备22', devices.devices) for (let i = 0; i < devices.devices.length; i++) { if (!(undefined == devices.devices[i].localName)) { //检索指定设备 if (devices.devices[i].localName.split('-')[0] == 'HRC') { console.log('已找到指定设备:', devices.devices[i].localName); //关闭搜索 wx.stopBluetoothDevicesDiscovery({ success (res) { console.log('关闭搜索',res) } }); //关闭蓝牙连接 wx.closeBluetoothAdapter({ success: function (res) { console.log('关闭蓝牙连接',res) } }); wx.showModal({ title: '提示', content: '发现设备:' + devices.devices[i].localName, showCancel: false, success: function (res) { if (res.confirm) { console.log('用户点击确定') that.lanya() } } }) break; } } } }) } }) }, fail: function (res) { wx.showModal({ showCancel: false, content: '请先开启手机蓝牙', success: function (res) { setTimeout(function () { that.lanya() }, 5000) } }) } }) } [图片]
2020-05-07 - 正式版小程序不调用消息订阅是什么原因?
POST https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=ACCESS_TOKEN 正式版小程序不调用这个接口是什么原因 开发板和测试版都可以
2020-04-27