Mini Program Ad
WdAd
Usage Instructions
Used to display WeChat ads in Mini Programs, enabling recommended ads to gain exposure and clicks, thereby allowing the Mini Program to generate profit.
After selecting the rewarded video ad component and configuring the ad unit id, you can display rewarded video ads by calling the component methods.
Component Usage Limitations
- The component must be used in a real Mini Program environment to observe the actual effect.
Properties
组件接收的外部传入的属性
属性名 | 属性标识 | 类型 | 说明 |
---|
广告类型 | adType | string | 默认值:"banner" |
广告单元id | unitId | string | |
广告主题 | adTheme | string | 默认值:"white" |
广告刷新间隔 | adIntervals | number | 广告自动刷新的间隔时间,单位为秒 |
格子个数 | gridCount | number | 默认值:5 |
多例模式 | multiton | boolean | |
禁用分享页 | disableFallbackSharePage | boolean |
Events
组件暴露的事件,可以监听组件的事件来触发一些外部的动作
事件名 | 事件code | 事件出参 event.detail | 适用情况 | 说明 |
---|
广告加载成功 | load | 小程序 | - | |
广告加载失败 | error | 小程序 | - | |
广告被关闭 | close | 小程序 | - |