开放数据域
var sharedCanvas = wx.getSharedCanvas();
var context= sharedCanvas.getContext('2d');
context.width = data[1].avatarUrl;
主域
var openDataContext = wx.getOpenDataContext();
var sharedCanvas = openDataContext.canvas;
var context = sharedCanvas.getContext('2d');
console.log("宽度:"+context.width);
这样就可以将头像链接传递到主域了,另外请问下我怎么在开放数据域设置
sharedCanvas
的大小?