# ad

Banner 广告。
左图右文广告示例

# 属性

属性 类型 必填 说明
type number 广告类型
unit-id number 广告单元 id
bindload (e: { detail: Record<string, unknown> } & Event) => void 广告加载成功的回调
binderror (e: { detail: { errCode: number } } & Event) => void 广告加载失败的回调
bindclose (e: { detail: Record<string, unknown> } & Event) => void 广告关闭的回调

# 错误码信息与解决方案表

错误码是通过 binderror 回调获取到的错误信息。

代码 异常情况
0 内部错误
1 广告对象已关闭
2 广告数据暂未准备好
3 网络错误
4 广告校验失败

# 示例代码

<ad type="{{13001}}" unit-id="{{13001001}}" bindload="adLoad" binderror="adError" bindclose="adClose"></ad>
Copyright ©2023, All Rights Reserved