[LayaAir3]OPPO小游戏下图片地址无法加载

这种图片地址 https://sh.mudgj.com/api/player/auth/img?key=testpng
oppo小游戏下 无法显示 
Laya.loader
.load(
"https://sh.mudgj.com/api/playe ... ot%3B,
Laya.Loader.IMAGE
)
.then((res: Laya.Texture) => {
let sp = new Laya.Sprite();
sp.texture = res;
sp.pos(0, 200);
this.addChild(sp);
});
无法正常显示
检查发现 qg.downloadFile  报 error
{
        "errCode": -3,
        "statusCode": 404,
        "errMsg": "com.nearme.instant.loopj.android.http.HttpResponseException"
}
如何处理
wechat_2025-08-17_103121_268.png
已邀请:

沉雷

赞同来自:

功能需求是人机验证 生成的临时验证码图片 在oppo小游戏下无法正常显示
其他 微小,抖小,快手,华为,荣耀,vivo,oppo 都是正常显示。问题已经解决,测试图片地址,稍后会失效,无法访问
oppo技术客服给出解决方案:
    let self: any = this;
this.btn.onClick(function () {
(Laya.Browser.window as any).jsb.loadImage(
"https://sh.mudgj.com/api/playe ... ot%3B,
(info: any) => {
var filePath = Laya.PAL.g.saveImageTempSync({
data: info.data,
width: info.width,
height: info.height,
fileType: "png",
});
// 再使用filePath赋值给src
self.img.src = filePath;
}
);

 
 

要回复问题请先

商务合作
商务合作