


改成
cc.loader.load({url:url,type:“png”},function (err,tex) {
console.log(‘1111load’+err); //tex为null
console.log(‘1111load’+tex);
var spriteFrame = new cc.SpriteFrame(tex, cc.Rect(0, 0, tex.width, tex.height));
callback(code,spriteFrame);
});
问题解决