Polyv Help Center

Help Center

Module Events

Updated: 2025-02-28 14:41:01

1. Product Click Event

Description: This event is triggered when a viewer clicks on a product.

Event: InteractReceiveEvents.ProductClick

Callback Parameters: Object object, detailed type description as follows

Property Description Type
nickname User nickname string
productId Product ID string
name Product name string
type Product type ProductClickType

Example:

watchCore.interactReceive.eventEmitter.on(InteractReceiveEvents.ProductClick, (data) => {
  toast.info(`${data.nickname}点击了${data.name}`);
});

2. Product Order Quantity Event

Event: InteractReceiveEvents.ProductBuyTimes

Callback Parameters: Object object, detailed type description as follows

Property Description Type
nickname Nickname of the first ordering viewer string
count Quantity number
productId Product ID string
productName Product name string
productType Product type IarProductType

Example:

watchCore.interactReceive.eventEmitter.on(InteractReceiveEvents.ProductBuyTimes, (data) => {
  console.log('3 秒内频道商品下单列表', data.list);
});

3. Interaction Settings Update Event

Event: InteractReceiveEvents.InteractSettingUpdate

Example:

watchCore.interactReceive.eventEmitter.on(InteractReceiveEvents.InteractSettingUpdate, () => {
  const interactSetting = watchCore.interactReceive.getInteractSetting()
  console.log('互动设置', interactSetting);
});

4. Check-in Count Event

Event: InteractReceiveEvents.SignInTimes

Callback Parameters: Object object, detailed type description as follows

Property Description Type
nickname Nickname of the first ordering viewer string
count Count number

Example:

watchCore.interactReceive.eventEmitter.on(InteractReceiveEvents.SignInTimes, (data) => {
  console.log('3 秒内频道签到次数', data.time);
  console.log('3 秒内频道首个签到昵称', data.nickname);
});
联系客服,在线咨询