drawImg绘制多张网路图片,不能全部同时显示?
发布于 6 年前 作者 taoshen 15051 次浏览 来自 问答

 

绘制了俩张网络图片,只显示了一张

wx.getImageInfo({

      src: path1,

      success: function (res) {

        console.log('商品图片本地图片', res)

        context.drawImage(res.path, 15, 230, 345, 200);

        context.draw(false, function (e) {

          console.log(e,'draw callback')

          

        })

      }

    })

wx.getImageInfo({

      src: path2,

      success: function (res) {

        console.log('头像本地图片', res.path)

        //绘制头像

        context.drawImage(res.path, 15, 580, 52, 52)

      }

    })

1 回复

第二张你没调用draw

回到顶部