Polyv Help Center

Help Center

EnrollLottery

Updated: 2022-08-16 14:47:23

Import Component

import EnrollLottery from '@polyv/interactions-launch-sdk-ui-default/lib/EnrollLottery';

Code Example

<template>
  <!-- 建议弹窗宽度为 560px,弹窗内容高度建议自适应,最高height: 500px -->
  <el-dialog
      v-if="checkInCore"
      :custom-class="'c-interactions-dialog c-interactions-dialog__h500'"
      width="560px"
      title="报名抽奖"
      :visible.sync="visible"
      :close-on-click-modal="false"
  >
    <EnrollLottery
        :lang="lang"
        :core="enrollLotteryCore"
    />
  </el-dialog>
</template>

<script>
import * as InteractionsLaunchSDK from '@polyv/interactions-launch-sdk';
import EnrollLottery from '@polyv/interactions-launch-sdk-ui-default/lib/EnrollLottery';
// 弹窗组件可以选择其他 UI 库组件或自行开发,这里没有限制。
import { Dialog } from 'element-ui';

export default {
  components: {
    ElDialog: Dialog,
    EnrollLottery,
  },
  data() {
    return {
      enrollLotteryCore: null,
      visible: false,
      liveStatus: true
    };
  },
  mounted() {
    // TODO: 关于初始化 InteractionsLaunchSDK 的其他设置
    this.enrollLotteryCore = new InteractionsLaunchSDK.EnrollLottery();
  }
};
</script>

Attributes

Attribute Type Default Description
core object Lottery SDK instance
lang string 'zh_CN' Language pack type. Values:
'zh_CN' Chinese
'en' English
isSubsidiaryRoom boolean false Whether to enable multi-room. When true, preset features are disabled.
maxWinnersDigit number 3 Maximum number of digits for the winner count
联系客服,在线咨询