Commit fad5c37d authored by fushaowu's avatar fushaowu

Merge branch 'master' of https://gitlab.yit.com/fushaowu/lottery

# Conflicts:
#	src/lottery.js
parents 1b7363c6 824b0464
...@@ -60,7 +60,7 @@ let vue = new Vue({ ...@@ -60,7 +60,7 @@ let vue = new Vue({
}, },
/** /**
* 抽奖开始 * 抽奖进行中, 每100毫秒选出一批用户显示到屏幕上
*/ */
start() { start() {
this.loadCandidateMap(); this.loadCandidateMap();
...@@ -83,7 +83,7 @@ let vue = new Vue({ ...@@ -83,7 +83,7 @@ let vue = new Vue({
/** /**
* *
* 抽奖结束 * 抽奖完成,选出一批用户作为本批中奖用户,显示到屏幕上
*/ */
end() { end() {
let winPerson = {}; let winPerson = {};
...@@ -118,8 +118,9 @@ function next(event) { ...@@ -118,8 +118,9 @@ function next(event) {
} }
/** /**
* * 从未中奖用户中随机选中N位
* @param {*} status true: 把中奖名单删除 * @param {*} num 抽奖人数
* @param {*} candidateMap 未中奖人员名单集合
*/ */
function getRandomPerson(num, candidateMap) { function getRandomPerson(num, candidateMap) {
let candidateList = [...candidateMap.values()]; let candidateList = [...candidateMap.values()];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment