功能需求是人机验证 生成的临时验证码图片 在oppo小游戏下无法正常显示
其他 微小,抖小,快手,华为,荣耀,vivo,oppo 都是正常显示。问题已经解决,测试图片地址,稍后会失效,无法访问
oppo技术客服给出解决方案:
[code] let self: any = this;
this.btn.onClick(function () {
(Laya.Browser.window as any).jsb.loadImage(
"https://sh.mudgj.com/api/player/auth/img?key=testpng",
(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;
}
);[/code]