- 【安卓】wx.chooseImage 压缩图片闪退
- 当前 Bug 的表现(可附上截图) [图片] 用户选择两张图片上传后弹出图片压缩中,然后小程序闪退,清除内存后相同操作步骤依然会出现这个情况 客户端机型MIX2s 用户已经上传了上报日志大概时间1-14 20:30 微信id: jeremiahhys - 预期表现 - 复现路径 - 提供一个最简复现 Demo
2019-01-16 - map组件加上include-points属性后,安卓上map组件无法正常显示
手机型号:HUAWEi P9 Android版本:7.0 手机型号:红米note3 Android版本:5.0.2 map组件加了include-points属性后安卓地图无法正常显示,工具和ios正常显示,安卓显示如下: [图片] ios显示正常:如下 [图片] 代码片段:wxml [代码]<[代码][代码]map[代码][代码] [代码][代码]id[代码][代码]=[代码][代码]"myMap"[代码][代码] [代码][代码]style[代码][代码]=[代码][代码]"width: 100%; height: {{scrollHeight}}rpx"[代码][代码] [代码][代码]latitude[代码][代码]=[代码][代码]"{{latitude}}"[代码][代码] [代码][代码]longitude[代码][代码]=[代码][代码]"{{longitude}}"[代码][代码] [代码][代码]markers[代码][代码]=[代码][代码]"{{markers}}"[代码][代码] [代码][代码]include-points[代码][代码]=[代码][代码]"{{includePoints}}"[代码][代码] [代码][代码]show-location[代码][代码] [代码][代码]bindmarkertap[代码][代码]=[代码][代码]"chooseShopByMarket"[代码][代码] [代码][代码]bindregionchange[代码][代码]=[代码][代码]"regionChange"[代码][代码] [代码][代码]bindtap[代码][代码]=[代码][代码]"tap"[代码][代码] [代码][代码]></[代码][代码]map[代码][代码]>[代码]代码片段:js[代码]// pages/user/location.js[代码][代码]var[代码] [代码]util = require([代码][代码]'../../utils/util.js'[代码][代码])[代码][代码]var[代码] [代码]page = require([代码][代码]'../../utils/page.js'[代码][代码])[代码][代码]var[代码] [代码]app = getApp();[代码][代码]Page({[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]latitude: 0,[代码][代码] [代码][代码]longitude: 0,[代码][代码] [代码][代码]markers:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]scrollHeight:0,[代码][代码] [代码][代码]showMap:[代码][代码]false[代码][代码],[代码][代码] [代码][代码]includePoints:[代码][代码]null[代码][代码],[代码][代码] [代码][代码]shopList:[],[代码][代码] [代码][代码]listBoxShow:[代码][代码]false[代码][代码],[代码][代码] [代码][代码]regionChangeLock:[代码][代码]false[代码][代码] [代码][代码]},[代码][代码] [代码][代码]onLoad:[代码][代码]function[代码][代码](){[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]wx.getLocation({[代码][代码] [代码][代码]type: [代码][代码]'wgs84'[代码][代码],[代码][代码] [代码][代码]success: [代码][代码]function[代码] [代码](res) {[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]latitude:res.latitude,[代码][代码] [代码][代码]longitude:res.longitude[代码][代码] [代码][代码]})[代码][代码] [代码][代码]that.getAroundShop();[代码][代码] [代码][代码]}})[代码] [代码] [代码][代码]},[代码][代码] [代码][代码]onReady: [代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]scrollHeight: app.globalData.useableHeight,[代码][代码] [代码][代码]})[代码][代码] [代码][代码]this[代码][代码].mapCtx = wx.createMapContext([代码][代码]'myMap'[代码][代码]);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]getAroundShop:[代码][代码]function[代码][代码](){[代码][代码] [代码][代码]setTimeout(()=>{[代码][代码] [代码][代码]setTimeout(()=>{[代码][代码] [代码][代码]this[代码][代码].data.regionChangeLock = [代码][代码]true[代码][代码];[代码][代码] [代码][代码]},1000)[代码] [代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]showMap:[代码][代码]true[代码][代码],[代码][代码] [代码][代码]listBoxShow:[代码][代码]true[代码][代码],[代码][代码] [代码][代码]markers:[[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: 1,[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5775,[代码][代码] [代码][代码]title: [代码][代码]'创意园1'[代码][代码],[代码][代码] [代码][代码]callout:{[代码][代码] [代码][代码]content:[代码][代码]'大坪英利店\n(大坪英利店大融城)'[代码][代码],[代码][代码] [代码][代码]fontSize:12,[代码][代码] [代码][代码]color:[代码][代码]'#ffffff'[代码][代码],[代码][代码] [代码][代码]bgColor:[代码][代码]'#121C32'[代码][代码],[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]padding:4,[代码][代码] [代码][代码]borderRadius:5,[代码][代码] [代码][代码]textAlign:[代码][代码]'left'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]iconPath:[代码][代码]'../../assets/images/shopcarLogo_fixed.png'[代码][代码],[代码][代码] [代码][代码]width:40,[代码][代码] [代码][代码]height:40[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: 2,[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5867,[代码][代码] [代码][代码]name: [代码][代码]'创意园1'[代码][代码],[代码][代码] [代码][代码]callout:{[代码][代码] [代码][代码]content:[代码][代码]'2'[代码][代码],[代码][代码] [代码][代码]fontSize:12,[代码][代码] [代码][代码]color:[代码][代码]'#ffffff'[代码][代码],[代码][代码] [代码][代码]bgColor:[代码][代码]'#121C32'[代码][代码],[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]padding:4,[代码][代码] [代码][代码]borderRadius:5,[代码][代码] [代码][代码]textAlign:[代码][代码]'center'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]iconPath:[代码][代码]'../../assets/images/shopcarLogo_fixed.png'[代码][代码],[代码][代码] [代码][代码]width:40,[代码][代码] [代码][代码]height:40[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: 3,[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5594,[代码][代码] [代码][代码]name: [代码][代码]'创意园1'[代码][代码],[代码][代码] [代码][代码]callout:{[代码][代码] [代码][代码]content:[代码][代码]'3'[代码][代码],[代码][代码] [代码][代码]fontSize:12,[代码][代码] [代码][代码]color:[代码][代码]'#ffffff'[代码][代码],[代码][代码] [代码][代码]bgColor:[代码][代码]'#121C32'[代码][代码],[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]padding:4,[代码][代码] [代码][代码]borderRadius:5,[代码][代码] [代码][代码]textAlign:[代码][代码]'center'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]iconPath:[代码][代码]'../../assets/images/shopcarLogo_fixed.png'[代码][代码],[代码][代码] [代码][代码]width:40,[代码][代码] [代码][代码]height:40[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: 4,[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5458,[代码][代码] [代码][代码]name: [代码][代码]'创意园1'[代码][代码],[代码][代码] [代码][代码]callout:{[代码][代码] [代码][代码]content:[代码][代码]'4'[代码][代码],[代码][代码] [代码][代码]fontSize:12,[代码][代码] [代码][代码]color:[代码][代码]'#ffffff'[代码][代码],[代码][代码] [代码][代码]bgColor:[代码][代码]'#121C32'[代码][代码],[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]padding:4,[代码][代码] [代码][代码]borderRadius:5,[代码][代码] [代码][代码]textAlign:[代码][代码]'center'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]iconPath:[代码][代码]'../../assets/images/shopcarLogo_fixed.png'[代码][代码],[代码][代码] [代码][代码]width:40,[代码][代码] [代码][代码]height:40[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]id: 5,[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5358,[代码][代码] [代码][代码]name: [代码][代码]'创意园1'[代码][代码],[代码][代码] [代码][代码]callout:{[代码][代码] [代码][代码]content:[代码][代码]'5'[代码][代码],[代码][代码] [代码][代码]fontSize:12,[代码][代码] [代码][代码]color:[代码][代码]'#ffffff'[代码][代码],[代码][代码] [代码][代码]bgColor:[代码][代码]'#121C32'[代码][代码],[代码][代码] [代码][代码]display:[代码][代码]'BYCLICK'[代码][代码],[代码][代码] [代码][代码]padding:4,[代码][代码] [代码][代码]borderRadius:5,[代码][代码] [代码][代码]textAlign:[代码][代码]'center'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]iconPath:[代码][代码]'../../assets/images/shopcarLogo_fixed.png'[代码][代码],[代码][代码] [代码][代码]width:40,[代码][代码] [代码][代码]height:40[代码][代码] [代码][代码]},[代码][代码] [代码][代码]],[代码][代码] [代码][代码]includePoints:[[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: [代码][代码]this[代码][代码].data.latitude,[代码][代码] [代码][代码]longitude: [代码][代码]this[代码][代码].data.longitude,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5775,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5867,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5594,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5458,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]latitude: 29.55314,[代码][代码] [代码][代码]longitude: 106.5358,[代码][代码] [代码][代码]}[代码][代码] [代码][代码]],[代码][代码] [代码][代码]shopList:[[代码][代码] [代码][代码]{[代码][代码] [代码][代码]name:[代码][代码]'优点24h便利店(时代天街店)'[代码][代码],[代码][代码] [代码][代码]address:[代码][代码]'重庆市渝中区大坪龙湖时代天街'[代码][代码],[代码][代码] [代码][代码]distance:[代码][代码]'780m'[代码][代码],[代码][代码] [代码][代码]shop_id:144[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]name:[代码][代码]'优点24h便利店(时代天街店)'[代码][代码],[代码][代码] [代码][代码]address:[代码][代码]'重庆市渝中区大坪龙湖时代天街'[代码][代码],[代码][代码] [代码][代码]distance:[代码][代码]'780m'[代码][代码],[代码][代码] [代码][代码]shop_id:144[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]name:[代码][代码]'优点24h便利店(时代天街店)'[代码][代码],[代码][代码] [代码][代码]address:[代码][代码]'重庆市渝中区大坪龙湖时代天街'[代码][代码],[代码][代码] [代码][代码]distance:[代码][代码]'780m'[代码][代码],[代码][代码] [代码][代码]shop_id:144[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]name:[代码][代码]'优点24h便利店(时代天街店)'[代码][代码],[代码][代码] [代码][代码]address:[代码][代码]'重庆市渝中区大坪龙湖时代天街'[代码][代码],[代码][代码] [代码][代码]distance:[代码][代码]'780m'[代码][代码],[代码][代码] [代码][代码]shop_id:144[代码][代码] [代码][代码]},[代码][代码] [代码][代码]{[代码][代码] [代码][代码]name:[代码][代码]'优点24h便利店(时代天街店)'[代码][代码],[代码][代码] [代码][代码]address:[代码][代码]'重庆市渝中区大坪龙湖时代天街'[代码][代码],[代码][代码] [代码][代码]distance:[代码][代码]'780m'[代码][代码],[代码][代码] [代码][代码]shop_id:144[代码][代码] [代码][代码]}[代码][代码] [代码][代码]][代码][代码] [代码][代码]})[代码][代码] [代码][代码]},2000)[代码][代码] [代码][代码]},[代码][代码] [代码][代码]getCenterLocation: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].mapCtx.getCenterLocation({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res){[代码][代码] [代码][代码]console.log(res.longitude)[代码][代码] [代码][代码]console.log(res.latitude)[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]moveToLocation: [代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].mapCtx.moveToLocation()[代码][代码] [代码][代码]},[代码][代码] [代码][代码]translateMarker: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]this[代码][代码].mapCtx.translateMarker({[代码][代码] [代码][代码]markerId: 1,[代码][代码] [代码][代码]autoRotate: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]duration: 1000,[代码][代码] [代码][代码]destination: {[代码][代码] [代码][代码]latitude:23.10229,[代码][代码] [代码][代码]longitude:113.3345211,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]animationEnd() {[代码][代码] [代码][代码]console.log([代码][代码]'animation end'[代码][代码])[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]includePoints: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]this[代码][代码].mapCtx.includePoints({[代码][代码] [代码][代码]padding: [10],[代码][代码] [代码][代码]points: [{[代码][代码] [代码][代码]latitude:23.10229,[代码][代码] [代码][代码]longitude:113.3345211,[代码][代码] [代码][代码]}, {[代码][代码] [代码][代码]latitude:23.00229,[代码][代码] [代码][代码]longitude:113.3345211,[代码][代码] [代码][代码]}][代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]toggleListBox:[代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]listBoxShow:![代码][代码]this[代码][代码].data.listBoxShow[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]chooseShop:[代码][代码]function[代码] [代码](shop_id) {[代码][代码] [代码][代码]return[代码] [代码]false[代码][代码];[代码][代码] [代码][代码]if[代码][代码](app.globalData.shop.shop_id!==shop_id){[代码][代码] [代码][代码]app.globalData.shop = [代码][代码]null[代码][代码];[代码][代码] [代码][代码]app.globalData.target_shop_id = shop_id;[代码][代码] [代码][代码]app.globalData.categories = [代码][代码]null[代码][代码];[代码][代码] [代码][代码]}[代码][代码] [代码][代码]wx.switchTab({[代码][代码] [代码][代码]url: [代码][代码]'/pages/index/index'[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]chooseShopByMarket:[代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]let shop_id = e.markerId;[代码][代码] [代码][代码]this[代码][代码].chooseShop(shop_id);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]chooseShopByList:[代码][代码]function[代码] [代码](e) {[代码][代码] [代码][代码]let shop_id = e.currentTarget.dataset.id;[代码][代码] [代码][代码]this[代码][代码].chooseShop(shop_id);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]regionChange:[代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]if[代码][代码](![代码][代码]this[代码][代码].data.regionChangeLock) [代码][代码]return[代码][代码];[代码][代码] [代码][代码]this[代码][代码].data.listBoxShow&&[代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]listBoxShow:[代码][代码]false[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]tap:[代码][代码]function[代码] [代码]() {[代码][代码] [代码][代码]if[代码][代码](![代码][代码]this[代码][代码].data.regionChangeLock) [代码][代码]return[代码][代码];[代码][代码] [代码][代码]this[代码][代码].data.listBoxShow&&[代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]listBoxShow:[代码][代码]false[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码]})[代码] 我的微信号:hhd534634672
2018-07-04