WeChat Store Product
WdStoreProduct
Usage Instructions
The WeChat Mini Program embeds WeChat Store products, displays store products, and redirects to transactions. It supports the Store Preferred Alliance's product promotion and commission function.
Component Usage Limitations
The component must be used in a real Mini Program environment to observe the actual effect.
Due to platform rules, keep the component content fully displayed. If you need to customize styles, use custom-style. The number and spacing of component elements, product guarantee content and sales data, component font size, and the height of the "Buy" button cannot be modified. Failure to comply will render the component unavailable and may result in suspension of the ability to use this component.
This component is currently not supported in Mini Programs on WeChat for Windows or WeChat for Mac.
Parameters product-promotion-link and media-id must be passed during the initial loading of the component. Adjusting parameters after the component has finished loading is not currently supported.
Properties
组件接收的外部传入的属性
属性名 | 属性标识 | 类型 | 说明 |
---|
小店appid | appid | string | |
商品id | productId | string | |
带货商品跟佣信息 | productPromotionLink | string | |
媒体文件id | mediaId | string | |
自定义样式 | customStyle | object | |
开启自定义插槽 | customContent | boolean | 开启自定义插槽。开启后可自行控制卡片内容。 示例:false |
跳转页面 | openPage | string | |
logo位置 | logoPosition | string | 示例:"bottom-left" |
Events
组件暴露的事件,可以监听组件的事件来触发一些外部的动作
事件名 | 事件code | 事件出参 event.detail | 适用情况 | 说明 |
---|
跳转小店成功的回调 | bindentersuccess | 小程序 | - | |
跳转小店失败的回调 | bindentererror | object
| 小程序 | - |