下载图片功能?

发布于 5 年前作者 liuyan8443 次浏览最后编辑 5 年前来自 ask

我上传的图片是 458*441的但是保存的图片是 356*440

//下载的方法
let downloadTask = wx.downloadFile({
      // url:this.data.dataINfo.new_photo,
      url:'https://aide.shangbensiyuan.com/uploads/21May2021090151.jpg',
      successres => {
        if (res.statusCode == 200) {
          // 保存到相册
          wx.saveImageToPhotosAlbum({
            filePath: res.tempFilePath,
            successres => {
              this.setData({
                bind:''
              })
              this.cusuUpdata()
              wx.showToast({
                title'保存图片成功!~',
              });
            
            },
            failfunction (res{
              wx.showToast({
                title'保存图片失败!~',
                icon'none'
              });
            }
          })
        }
      }
    })
1 回复
cmo
cmo1 楼3 个月前

请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。