Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lottery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fushaowu
lottery
Commits
fad5c37d
Commit
fad5c37d
authored
Jan 06, 2021
by
fushaowu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.yit.com/fushaowu/lottery
# Conflicts: # src/lottery.js
parents
1b7363c6
824b0464
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lottery.js
src/lottery.js
+5
-4
No files found.
src/lottery.js
View file @
fad5c37d
...
...
@@ -60,7 +60,7 @@ let vue = new Vue({
},
/**
* 抽奖
开始
* 抽奖
进行中, 每100毫秒选出一批用户显示到屏幕上
*/
start
()
{
this
.
loadCandidateMap
();
...
...
@@ -83,7 +83,7 @@ let vue = new Vue({
/**
*
* 抽奖
结束
* 抽奖
完成,选出一批用户作为本批中奖用户,显示到屏幕上
*/
end
()
{
let
winPerson
=
{};
...
...
@@ -118,8 +118,9 @@ function next(event) {
}
/**
*
* @param {*} status true: 把中奖名单删除
* 从未中奖用户中随机选中N位
* @param {*} num 抽奖人数
* @param {*} candidateMap 未中奖人员名单集合
*/
function
getRandomPerson
(
num
,
candidateMap
)
{
let
candidateList
=
[...
candidateMap
.
values
()];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment