Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
goodluck
Overview
Overview
Details
Activity
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
fukai
goodluck
Commits
4894f7b8
Commit
4894f7b8
authored
Mar 20, 2020
by
zhangyongfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase the total number of configurable draws
parent
d1c9d488
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
19 deletions
+32
-19
README.md
README.md
+5
-0
App.vue
src/App.vue
+13
-11
LotteryConfig.vue
src/components/LotteryConfig.vue
+3
-1
Publicity.vue
src/components/Publicity.vue
+4
-0
Result.vue
src/components/Result.vue
+7
-7
No files found.
README.md
View file @
4894f7b8
...
...
@@ -4,6 +4,11 @@
## 使用说明
### 配置建议
-
本程序理论支持配置百万级别人数,超过 10 万以上时初始化会比较耗时,初始化后可以正常抽奖。
-
如果人数较多,不建议导入名单或照片,按号码抽奖即可。
### 抽奖配置
-
设置抽奖总人数、奖项及每个奖项的人数,默认包含两个奖项,如果不想抽取默认的奖项,可以设置该奖项数量为 0
...
...
src/App.vue
View file @
4894f7b8
...
...
@@ -16,8 +16,7 @@
<a
href=
"javascript:void(0);"
:style=
"
{
color:
!running
&&
allresult.includes(item.key) ? '#ff2200' : '#fff'
color: '#fff'
}"
>
{{
item
.
name
?
item
.
name
:
item
.
key
}}
...
...
@@ -173,17 +172,20 @@ export default {
return
allresult
;
},
datas
()
{
const
datas
=
[];
for
(
let
index
=
1
;
index
<=
this
.
config
.
number
;
index
++
)
{
const
listData
=
this
.
list
.
find
(
d
=>
d
.
key
===
index
);
const
photo
=
this
.
photos
.
find
(
d
=>
d
.
id
===
index
);
datas
.
push
({
key
:
index
,
const
{
number
}
=
this
.
config
;
const
nums
=
number
>=
1500
?
500
:
this
.
config
.
number
;
const
configNum
=
number
>
1500
?
Math
.
floor
(
number
/
3
)
:
number
;
const
randomShowNums
=
luckydrawHandler
(
configNum
,
[],
nums
);
const
randomShowDatas
=
randomShowNums
.
map
(
item
=>
{
const
listData
=
this
.
list
.
find
(
d
=>
d
.
key
===
item
);
const
photo
=
this
.
photos
.
find
(
d
=>
d
.
id
===
item
);
return
{
key
:
item
*
(
number
>
1500
?
3
:
1
),
name
:
listData
?
listData
.
name
:
''
,
photo
:
photo
?
photo
.
value
:
''
}
)
;
}
return
d
atas
;
};
}
);
return
randomShowD
atas
;
},
categoryName
()
{
return
conversionCategoryName
(
this
.
category
);
...
...
src/components/LotteryConfig.vue
View file @
4894f7b8
...
...
@@ -92,7 +92,8 @@ export default {
return
this
.
$store
.
state
.
config
;
},
set
(
val
)
{
this
.
$store
.
commit
(
'setConfig'
,
val
);
// this.$store.commit('setConfig', val);
return
val
;
}
},
storeNewLottery
()
{
...
...
@@ -108,6 +109,7 @@ export default {
methods
:
{
onSubmit
()
{
setData
(
configField
,
this
.
form
);
this
.
$store
.
commit
(
'setConfig'
,
this
.
form
);
this
.
$emit
(
'update:visible'
,
false
);
this
.
$message
({
...
...
src/components/Publicity.vue
View file @
4894f7b8
...
...
@@ -61,6 +61,10 @@ export default {
margin
:
0
auto
;
position
:
relative
;
overflow
:
hidden
;
.el-carousel
{
width
:
80vw
;
margin
:
0
auto
;
}
.item
{
text-align
:
center
;
color
:
#fff
;
...
...
src/components/Result.vue
View file @
4894f7b8
...
...
@@ -111,10 +111,10 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.c-Result
{
.el-dialog__body
{
max-height
:
500px
;
overflow-y
:
auto
;
}
.el-dialog__body
{
max-height
:
500px
;
overflow-y
:
auto
;
}
.listrow
{
display
:
flex
;
line-height
:
30px
;
...
...
@@ -127,9 +127,9 @@ export default {
}
.card
{
display
:
inline-block
;
width
:
40px
;
height
:
40
px
;
line-height
:
4
0px
;
//
width
:
40px
;
padding
:
0
5
px
;
line-height
:
3
0px
;
text-align
:
center
;
font-size
:
18px
;
font-weight
:
bold
;
...
...
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