wx.chooseImage({
count: 9,
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
console.log(res)
}
})
当图片都选择压缩式,崩溃概率极高
问题模块 | 框架类型 | 问题类型 | API/组件名称 | 终端类型 | 微信版本 | 基础库版本 |
---|---|---|---|---|---|---|
API和组件 | 小程序 | Bug | chooseImage | 客户端 | 7.0.3 | 2.6.6 |
wx.chooseImage({
count: 9,
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
console.log(res)
}
})
当图片都选择压缩式,崩溃概率极高
崩溃是什么表现?麻烦具体描述下,另外请提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)
崩溃就是页面卡死然后重载了
可以先排查下是不是内存紧张导致的https://developers.weixin.qq.com/miniprogram/dev/api/device/performance/wx.onMemoryWarning.html
内存紧张也不知道页面挂掉吧
选择图片超过三张绝对崩溃