Skip to main content

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. image

Component Usage Limitations

  1. The component must be used in a real Mini Program environment to observe the actual effect.

Properties

组件接收的外部传入的属性

属性名
属性标识
类型
说明
广告类型adTypestring

不同类型广告的计收规则和呈现样式不同,类型说明

默认值:"banner"

广告单元idunitIdstring

可在微信公众平台的流量主模块新建

广告主题adThemestring

默认值:"white"

广告刷新间隔adIntervalsnumber

为空时,广告不会自动刷新,参数值必须大于30。

广告自动刷新的间隔时间,单位为秒

格子个数gridCountnumber

广告格子个数设置,参数值可选5,8

默认值:5

多例模式multitonboolean
禁用分享页disableFallbackSharePageboolean

Events

组件暴露的事件,可以监听组件的事件来触发一些外部的动作

事件名
事件code
事件出参 event.detail
适用情况
说明
广告加载成功load小程序

-

广告加载失败error小程序

-

广告被关闭close小程序

-