小程序 canvas 画云存储的地址的图片怎么画?getImageInfo 好像不对

发布于 6 年前作者 leizhang13013 次浏览最后编辑 6 年前来自 ask
 let bgUrl = ''
    // canvas绘制网络图片需保存至本地
    wx.getImageInfo({
      src'',//服务器返回的图片地址
      successfunction (res{
        console.log(res);
          bgUrl = res.Path
      },
      failfunction (res{
        console.log(res);
      }
    });
    ctx.drawImage(bgUrl, 00, wigth, height);
1 回复
heping
heping1 楼4 年前