主要遇到了两点问题。
1.HTML文件内的body需要注入
<script>window.FBPlayableOnCTAClick = () => (typeof FbPlayableAd === 'undefined') ? alert('FBPlayableAd.onCTAClick') : FbPlayableAd.onCTAClick();</script>
2.跳转商店使用
try{
if (typeof window["FBPlayableOnCTAClick"] === "function") {
// 函数存在,可以安全调用
window["FBPlayableOnCTAClick"]();
} else {
// 函数不存在,进行相应处理
window.open(Utils.getJumpWebString());
console.error("FBPlayableOnCTAClick function does not exist.");
}
}catch(e){
console.error(e);
}