收藏
回答

iphone 8 上 刚进入页面调用wx.chooseImage 调不起来

框架类型 问题类型 API/组件名称 终端类型 微信版本 基础库版本
小程序 Bug wx.chooseImage 客户端 7.0.1 2.5.0

- 当前 Bug 的表现(可附上截图)


- 预期表现


- 复现路径


- 提供一个最简复现 Demo


当前bug:



    期望表现:



复现路径在某个页面调用 代码片段代码 用iphone 8 测试  如果只是调起相册sourceType: ['album'] 不行,如果sourceType: ['album', 'camera']调起相册和相机, 是可以的


// pages/SubmitReportPage/SubmitReportPage.js Page({ /** * 页面的初始数据 */ data: { releaseBtnDisabled:false, tempFilePaths: ['https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png', 'https://t.activity.ihappy.vip/storage/image/18/09/03/666/112522_001_80.png' ], isScroll:true, firstTuneAlbum:true }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { if (this.data.firstTuneAlbum) { //此处加了个开关 this.chooseImg(); this.setData({ firstTuneAlbum: false }) } }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { }, //发布报告 releaseReport(){ wx.showLoading({ title: '正在发布', }) //todo }, //选择图片 chooseImg(){ let that = this; console.log('wx') wx.chooseImage({ count: 9, sizeType: ['original', 'compressed'], sourceType: ['album'], success(res) { let tempFilePaths = res.tempFilePaths that.setData({ tempFilePaths: tempFilePaths }) }, fail(err){ console.log('err',err) } }) }, //动态计算 scroll-view 的宽度 calculateScrollWidth(){ } })
最后一次编辑于  2019-01-10
回答关注问题邀请回答
收藏

1 个回答

  • 是小白啊
    是小白啊
    2019-01-11

    麻烦按照教程提供下代码片段:https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    2019-01-11
    有用
    回复
登录 后发表内容