Polyv Help Center

Help Center

Registration Lottery

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

Feature Overview

Upload a participant list or allow the audience to register for the lottery. The lottery will automatically draw winners after the countdown ends.

  • This feature only supports the assistant role in initiating and stopping the lottery.
  • Supports setting a scheduled draw time.
  • Allows viewing the list of winners.
  • Supports repeated draws for the same batch of registrations (no need to re-register or re-upload the list).
  • Repeated draws can be configured to filter out previous winners.

Code Example

Note: Before starting the following steps, global initialization settings must be completed. Refer to the documentation.

Basic Flow

const app = new EnrollLottery();

// 订阅事件监听。
app
  // 报名抽奖开始
  .on('startLotteryForSignUp', () => {})
  // 报名抽奖结束
  .on('endLotteryForSignUp', () => {})

// 开始抽奖前。
app.getOnLottery()
// 获取抽奖记录, lotteryStatus:normal 返回当前抽奖中数据, underfind 分页获取抽奖列表
app.getLotteryList({pageNumberNumber, pageSize, lotteryStatus});

// 保存或修改抽奖信息。
app.saveInfo(createEnrollLotteryParams);

// 提前开奖。
app.startLottery({ lottery });

// 取消抽奖。
app.cancelLottery({ lottery });

// 获取中奖名单。
app.getWinnerList(winnerParams);
联系客服,在线咨询
在线咨询