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. 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 a single instance of the announcement SDK |
| getCheckIn | Get a single instance of the check-in SDK |
| getAnswerCard | Get a single instance of the answer card SDK |
| getQuestionnaire | Get a single instance of the questionnaire SDK |
| getQuestionAnswer | Get a single instance of the Q&A SDK |
| getPushCard | Get a single instance of the card push SDK |
| getPopupAd | Get a single instance of the channel viewing page popup ad SDK |
| getLottery | Get a single instance of the lottery SDK |
| getWelfareLottery | Get a single instance of the conditional lottery SDK |
| getEnrollLottery | Get a single instance of the enrollment lottery SDK |
| getRedpack | Get a single instance of the red packet SDK |
| getRedpackRain | Get a single instance of the red packet rain SDK |
| getVote | Get a single instance of the voting SDK |
| getFeedBack | Get a single instance of the feedback SDK |
| getProduct | Get a single instance of the product library SDK |
| processProductReplay | Product library replay |
| getTuwen | Get a single instance of the text-image live SDK |
| getSeatTable | Get a single instance of the cloud seat SDK |
| setupSeatTable | Set cloud seat information |
| getTopicPK | Get a single instance of the topic PK SDK |
| getRushAnswer | Get a single instance of the rush answer SDK |
| getProductLinkJumpTipDetail | Get the product library button click prompt template configuration |
| getAddressManagement | Get a single instance of the address management SDK |
| getOrder | Get a single instance of the order SDK |
| getLotteryPrivacyDetail | Get lottery privacy agreement data |
| parseProductDetail | Parse product details |
| getVoteSetting | Get voting settings |
| getIarCoreV2 | - |
| getAnswerCardV2 | Get a single instance of the answer card SDK (V2) |
| getQuestionnaireV2 | Get a single instance of the questionnaire SDK (V2) |
| getCheckInV2 | Get a single instance of the check-in SDK (V2) |
| getLotteryV2 | Get a single instance of the lottery SDK (V2) |
| getCouponV2 | Get a single instance of the coupon SDK (V2) |
| getLuckyLotteryV2 | Get a single instance of the platform lottery SDK |
| getLuckyBagV2 | Get a single instance of the lucky bag SDK (V2) |
| getVoteV2 | Get a single instance of the voting SDK (V2) |
| getBulletinV2 | Get a single instance of the bulletin SDK (V2) |
4. Event Overview
| Event | Description |
|---|---|
| InteractReceiveEvents.ProductClick | Product library click event |
| InteractReceiveEvents.ProductBuyTimes | Product order quantity event |
| InteractReceiveEvents.InteractSettingUpdate | Interaction setting update event |
| InteractReceiveEvents.SignInTimes | Check-in count event |
