下载图片wx.downloadFile报错:connect ECONNREFUSED 443?

发布于 8 年前作者 ashao12793 次浏览最后编辑 8 年前来自 issues

返回报错:errMsg: “downloadFile:fail Error: connect ECONNREFUSED 127.0.0.1:443”

能帮忙看下嘛?图片放在七牛上面的,海外存储,CDN限制了海外。

补充一下:翻墙后是能访问的。

//this.data.shareImage = https://cdn.amkidscloset.club/ow5gjpry5qvwpfeii8af.jpg

wx.downloadFile({
      url: this.data.shareImage,
      success: function(res) {
        wx.saveImageToPhotosAlbum({
          filePath: res.tempFilePath,
          success: function(res) {
            wx.showModal({
              title: '生成海报成功',
              content: '海报已成功保存到相册',
              showCancel: false,
              confirmText: '好的',
              confirmColor: '#a78845'
            })
          },
          fail: function(res) {
            console.log(res)
          }
        })
      },
      fail: function(res) {
        console.log(res)
      }
    })
2 回复
gyao
gyao1 楼5 年前

图片不存在

yinfang
yinfang2 楼5 年前

因为文件压根不存在