为什么使用wx.chooseImage,在真机上选择相册最后一张图片,最上面完成按钮还是灰色?
发布于 7 年前 作者 xia10 11572 次浏览 来自 官方Issues
 wx.chooseImage({
      //限制图片上传为4张
      count: 6 - that.data.upload_list.length,
      sizeType: ['original','compressed'],
      sourceType: ['album', 'camera'],
      success(res) {
        //拿小程序生成的图片链接做图片的回显
        that.setData({
          upload_list: that.data.upload_list.concat(res.tempFilePaths)
        })
        // // 获取上传图片长度
        var length = that.data.upload_list.length
        // 大于1显示数量
        if (length >= 1) {
          that.setData({
            camera: 1,
            amount: length
          })
        }
        // 隐藏上传图片功能
        if (length == 6) {
          that.setData({
            upload: 0
          })
        }
      }
    })
3 回复

你好,测试并未复现,请提供能复现问题的简单代码片段https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

另外,用复现问题的手机扫下面的小程序码,提供下扫码结果截图



选择最后一张了,但是上面完成按钮还是灰色,大佬请帮吗看一下

有解决方法了吗

回到顶部