Interaction Module
1. Overview
互动模块(interactReceive) is primarily responsible for the logic processing on the interaction receiving end. It has integrated the interaction receiving end JSSDK provided by Polyv internally. Developers can use the API provided by the interactReceive module to obtain a single instance of each interaction function SDK and pass the instance into the UI component of the interaction receiving end. This document only provides the method for obtaining a single instance. For detailed usage, please refer to the Interaction Receiving End JSSDK documentation.
Note: The
interactReceivemodule will automatically update the interaction SDK configuration. Developers do not need to callupdateConfigseparately for updates.
2. Usage
Obtain a single instance of the interaction component through the viewing page SDK and create an interaction UI component example (using card push as an example):
<!-- @file 卡片推送 -->
<template>
<iar-push-card
:push-card-sdk="pushCardSdk"
@entry-visible-changed="entryVisibleChanged"
/>
</template>
<script>
// 引入互动功能 UI 组件
import IarPushCard from '@polyv/interactions-receive-sdk-ui-default/lib/PushCard';
export default {
components: {
IarPushCard,
},
data() {
return {
pushCardSdk: null,
};
},
methods: {
entryVisibleChanged(visible) {
// 当有入口时,回调入口的显示状态
// visible:是否显示,true:显示,false:隐藏
console.info('### 2.1 卡片入口当前的显示状态:', visible);
}
},
mounted() {
this.pushCardSdk = watchCore.internalReceive.getPushCard();
},
};
</script>
3. API Method Overview
| API Method | Description |
|---|---|
| setupIarCore | Install the interaction receiving end SDK |
| getInteractSetting | Get interaction setting information |
| getAnnouncement | Get the announcement SDK single instance |
| getCheckIn | Get the check-in SDK single instance |
| getAnswerCard | Get the answer card SDK single instance |
| getQuestionnaire | Get the questionnaire SDK single instance |
| getQuestionAnswer | Get the Q&A SDK single instance |
| getPushCard | Get the card push SDK single instance |
| getLottery | Get the lottery SDK single instance |
| getWelfareLottery | Get the conditional lottery SDK single instance |
| getEnrollLottery | Get the enrollment lottery SDK single instance |
| getRedpack | Get the red envelope SDK single instance |
| getRedpackRain | Get the red envelope rain SDK single instance |
| getVote | Get the voting SDK single instance |
| getFeedBack | Get the feedback SDK single instance |
| getProduct | Get the product library SDK single instance |
| processProductReplay | Product library replay |
| getTuwen | Get the text-image live SDK single instance |
| getSeatTable | Get the cloud seat SDK single instance |
| setupSeatTable | Set cloud seat information |
| getTopicPK | Get the topic PK SDK single instance |
| getRushAnswer | Get the rush answer SDK single instance |
| getProductLinkJumpTipDetail | Get the product library button click prompt template configuration |
| getAddressManagement | Address management SDK single instance |
| getOrder | Order SDK single instance |
| getLotteryPrivacyDetail | Get lottery privacy agreement data |
| parseProductDetail | Parse product details |
| getVoteSetting | Get voting settings |
| getIarCoreV2 | - |
| getAnswerCardV2 | Get the answer card SDK single instance (V2) |
| getQuestionnaireV2 | Get the questionnaire SDK single instance (V2) |
| getCheckInV2 | Get the check-in SDK single instance (V2) |
| getLotteryV2 | Get the lottery SDK single instance (V2) |
| getCouponV2 | Get the coupon SDK single instance (V2) |
| getLuckyLotteryV2 | Get the platform lottery SDK single instance |
| getLuckyBagV2 | Get the lucky bag SDK single instance (V2) |
| getVoteV2 | Get the voting SDK single instance (V2) |
| getBulletinV2 | Get the announcement SDK single instance (V2) |
4. Event Overview
| Event | Description |
|---|---|
| InteractReceiveEvents.ProductClick | Product library click event |
| InteractReceiveEvents.ProductBuyTimes | Product order quantity event |
| InteractReceiveEvents.InteractSettingUpdate | Interaction setting information update event |
| InteractReceiveEvents.SignInTimes | Check-in count event |
