qq玩一玩的图片替换

cc.loader.load(‘a.png’, function (err, tex) {
cc.log('Result should be a texture: ’ + (tex instanceof cc.Texture2D));
});

cc.loader.load(‘http://example.com/a.png’, function (err, tex) {
cc.log('Should load a texture from external url: ’ + (tex instanceof cc.Texture2D));
});

cc.loader.load({url: ‘http://example.com/getImageREST?file=a.png’, type: ‘png’}, function (err, tex) {
cc.log('Should load a texture from RESTful API by specify the type: ’ + (tex instanceof cc.Texture2D));
});

官网的这三种方法,我都试过了,使用线上图片没有问题,但是使用从qq服务器拉取的头像数据就会出问题,我看了QQ的头像地址是第三种方式,但是我试了jpg,png格式都无法正常显示,有人遇到过这个问题吗?

解决了,就是使用的第三种方式,我是因为编译的时候报错了,在调试的时候没有弹出,所以误会失败了