- 第三方开发小程序开发者工具wx.checkSession一直fail,真机预览成功?
代码流程: 1、进入登录页面调用wx.login获取code(成功),提交给后台接口 2、点击<button open-type="getPhoneNumber" ></button>调用wx.checkSession,开发者工具一直返回“checkSession:fail 系统错误,错误码:-13001,session time out, need relogin”,此时再去wx.login,仍然报上述错误 [图片] 3、奇怪的是微信开发者工具切换不同的账号,有的账号不报错,有的报错 4、真机调试一直都是成功的 5、上述代码流程用在普通小程序而非第三方开发小程序上都不报错 extAppId:wx5abbf37eff5cdbfa
04-11 - bindregionchange调用后台接口数据动态修改markers死循环
- 当前 Bug 的表现(可附上截图) - 预期表现 - 复现路径 - 提供一个最简复现 Demo 使用map组件,用bindregionchange视图改变去调用后台接口数据动态修改markers,出现重复调用死循环,期望效果是:视图改变动态修改markers不去再触发bindregionchange事件 [代码]onScaleRegion(e) {[代码][代码] [代码][代码]let etype = e.type;[代码][代码] [代码][代码]// 只捕捉移动后的点的信息[代码][代码] [代码][代码]if[代码] [代码](etype === [代码][代码]'end'[代码][代码]) {[代码][代码] [代码][代码]// 获取可视区域的东北和西南的坐标[代码][代码] [代码][代码]this[代码][代码].getRegion()[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码] [代码]getRegion() {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]this[代码][代码].mapCtx = wx.createMapContext([代码][代码]'map'[代码][代码])[代码][代码] [代码][代码]that.mapCtx.getRegion({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]let northeast = app.request.qqMapTransBaiduMap(res.northeast.latitude, res.northeast.longitude)[代码][代码] [代码][代码]let southwest = app.request.qqMapTransBaiduMap(res.southwest.latitude, res.southwest.longitude)[代码][代码] [代码][代码]that.mapCtx.getScale({[代码][代码] [代码][代码]success: (scale) => {[代码][代码] [代码][代码]// 调用后台接口,更新markers[代码][代码] [代码][代码]that.getData(northeast, southwest, scale.scale)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码]getData(northeast, southwest, scale) {[代码][代码] [代码][代码]let that = [代码][代码]this[代码][代码] [代码][代码]let param = {[代码][代码] [代码][代码]beginLat: southwest.lat,[代码][代码] [代码][代码]beginLng: southwest.lng,[代码][代码] [代码][代码]endLat: northeast.lat,[代码][代码] [代码][代码]endLng: northeast.lng,[代码][代码] [代码][代码]level: that.getLevel(scale)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]if[代码] [代码](param.level === [代码][代码]'list'[代码][代码]) {[代码][代码] [代码][代码]param.lat = that.data.latitude[代码][代码] [代码][代码]param.lng = that.data.longitude[代码][代码] [代码][代码]}[代码][代码] [代码][代码]app.request.get([代码][代码]'/xxx'[代码][代码], param).then(data => {[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'test'[代码][代码],[代码][代码] [代码][代码]mask: [代码][代码]true[代码][代码] [代码][代码]})[代码][代码] [代码][代码]let arr = (data.records || []).map((item, index) => {[代码][代码] [代码][代码]let result = app.request.baiduMapTransQQMap(item.lat, item.lng)[代码][代码] [代码][代码]return[代码] [代码]{[代码][代码] [代码][代码]id: index,[代码][代码] [代码][代码]latitude: result.lat,[代码][代码] [代码][代码]longitude: result.lng,[代码][代码] [代码][代码]iconPath: [代码][代码]'../../image/pos.png'[代码][代码],[代码][代码] [代码][代码]width: 30,[代码][代码] [代码][代码]height: 30,[代码][代码] [代码][代码]callout: {[代码][代码] [代码][代码]content: item.storeName,[代码][代码] [代码][代码]padding: 5,[代码][代码] [代码][代码]borderRadius: 5,[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]textAlign:[代码][代码]'center'[代码][代码],[代码][代码] [代码][代码]bgColor: [代码][代码]'#FFFFFF'[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]markers: arr[代码][代码] [代码][代码]})[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码]
2019-02-28