如何在子域中绘制玩家微信头像?(不用微信提供的api,我想用cocos控件来显示)
我是参考cocos提供的方案,在子域中用cocos控件做了一个viewlist,涉及到头像的代码如下:
cc.loader.load(userData.avatarUrl, function(err, texture){
console.log("load download_url = ", userData.avatarUrl);
var MyHeadSprite = new cc.SpriteFrame(texture);
this.head.spriteFrame = MyHeadSprite;
}.bind(this));
结果报错了:
gameSubContextThirdScriptError
fs.access is not a function;at requestAnimationFrame callback function
TypeError: fs.access is not a function
穿件微信头像是不是只能用wx.createImage()???
如果是这样的话,cocos提供的子域方案不是没用?
@panda