drawImg绘制多张网路图片,不能全部同时显示?

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

WXOPEN Club 内容图片 

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

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 回复
baiming
baiming1 楼5 年前

第二张你没调用draw