收藏
回答

下载图片功能?

我上传的图片是 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'
              });
            }
          })
        }
      }
    })
回答关注问题邀请回答
收藏
登录 后发表内容