提交 ea003cc4 作者: wangjin

增加激励视频接口

上级 8c4fe5d5
...@@ -797,7 +797,7 @@ class WechatSDK { ...@@ -797,7 +797,7 @@ class WechatSDK {
wxVideoAdParams && wxVideoAdParams.onError(err); wxVideoAdParams && wxVideoAdParams.onError(err);
}); });
}; };
public playAdVideo = async (Params: ProductInfo, callback?: Function, retry: number = 0) => { public playAdVideo = async (Params: ProductInfo, callback: Function, retry: number = 0) => {
if (retry > 2) { if (retry > 2) {
callback({ status: false }); callback({ status: false });
return; return;
...@@ -810,7 +810,7 @@ class WechatSDK { ...@@ -810,7 +810,7 @@ class WechatSDK {
this.CustomReport({ customeventName: "adVideoReport", customeventData: {...Params} }); // 上报播放完成 this.CustomReport({ customeventName: "adVideoReport", customeventData: {...Params} }); // 上报播放完成
callback({ status: true }); callback({ status: true });
}) })
.catch(err => this.playAdVideo(Params, retry++, callback)); .catch(err => this.playAdVideo(Params, callback, retry++));
}); });
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论