- 网页获取位置报错the permission value is offline verifying?
官方的方法已经尝试过。config方法正确,在ready方法里检查api,然后才执行回调。 https://developers.weixin.qq.com/community/develop/doc/000a24a11e8c786fdf29b6dc659c09?highLine=the%2520permission%2520value%2520is%2520offline%2520verifying [图片] wx.config({ beta: true, debug: false, appId, timestamp: Number(timestamp), nonceStr, signature, jsApiList: ['chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'getLocalImgData', 'openLocation', 'getLocation'] }); wx.ready(() => { console.log('初始化js-sdk成功'); wx.checkJsApi({ jsApiList: ['getLocation'], success(res) { if (res.checkResult.getLocation === false) { const message = '你的微信版本太低,不支持微信JS接口,请升级到最新的微信版本!' reject(message); } else { const message = 'js-sdk检查成功'; console.log(message); resolve(message); } }, fail(res) { const message = 'checkJsApi fail=' + JSON.stringify(res); console.log(message); reject(message); } }); });
2020-11-05 - 小程序组件怎么在不同项目复用?
-通常在做其他平台开发的时候都会有三方库的引用和管理,然后把自己能复用的组件用这种方式集成到不同项目里。 小程序目前component目录我基本是复制进去的,以前不是做前端的,还不知道有什么方法
2020-07-06 - 页面上多个input,怎么通过代码切换到下一个input?
需求:一个input输入完成,回车,激活下一个input。以下尝试都没有效果 尝试1:bindconfirm对应的JS方法里,通过id获取下一个input,设置focus。 let input = this.createSelectorQuery().select('#input' + nextIndex) input.focus = true 尝试2:套一层form,input设置confirm-type = "next"
2020-04-09