小程序 canvas 画云存储的地址的图片怎么画?getImageInfo 好像不对
发布于 4 年前 作者 leizhang 12845 次浏览 来自 问答
 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);
回到顶部