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
9ea65295
Commit
9ea65295
authored
Dec 27, 2019
by
zhangyongfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复多次抽奖不减去奖池人数的bug
parent
75e4d4dd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
App.vue
src/App.vue
+16
-6
Tool.vue
src/components/Tool.vue
+1
-0
No files found.
src/App.vue
View file @
9ea65295
...
...
@@ -25,6 +25,7 @@
v-for=
"item in resArr"
:key=
"item"
class=
"itemres"
:style=
"resCardStyle"
@
click=
"showRes = false"
>
{{
item
}}
...
...
@@ -32,7 +33,7 @@
</div>
<LotteryConfig
:visible
.
sync=
"showConfig"
@
resetconfig=
"reloadTagCanvas"
/>
<Tool
@
toggle=
"toggle"
:running=
"running"
/>
<Tool
@
toggle=
"toggle"
@
resetConfig=
"reloadTagCanvas"
:running=
"running"
/>
<Result
:visible
.
sync=
"showResult"
></Result>
<span
class=
"copy-right"
>
...
...
@@ -59,6 +60,18 @@ export default {
components
:
{
LotteryConfig
,
Publicity
,
Tool
,
Result
},
computed
:
{
resCardStyle
()
{
const
style
=
{};
const
{
number
}
=
this
.
config
;
if
(
number
<
100
)
{
style
.
fontSize
=
'100px'
;
}
else
if
(
number
<
1000
)
{
style
.
fontSize
=
'80px'
;
}
else
if
(
number
<
10000
)
{
style
.
fontSize
=
'60px'
;
}
return
style
;
},
config
:
{
get
()
{
return
this
.
$store
.
state
.
config
;
...
...
@@ -192,16 +205,13 @@ export default {
this
.
resArr
=
resArr
;
this
.
category
=
category
;
if
(
this
.
result
[
category
])
{
if
(
!
this
.
result
[
category
])
{
this
.
$set
(
this
.
result
,
category
,
[]);
}
const
oldRes
=
this
.
result
[
category
]
||
[];
const
data
=
Object
.
assign
({},
this
.
result
,
{
[
category
]:
oldRes
.
concat
(
resArr
)
});
this
.
result
=
data
;
window
.
TagCanvas
.
SetSpeed
(
'rootcanvas'
,
[
5
,
1
]);
}
...
...
@@ -272,7 +282,7 @@ export default {
border-radius
:
4px
;
border
:
1px
solid
#ccc
;
line-height
:
160px
;
font-size
:
10
0px
;
font-size
:
8
0px
;
font-weight
:
bold
;
margin-right
:
20px
;
margin-top
:
20px
;
...
...
src/components/Tool.vue
View file @
9ea65295
...
...
@@ -136,6 +136,7 @@ export default {
.
then
(()
=>
{
clearData
();
this
.
$store
.
commit
(
'setClearStore'
);
this
.
$emit
(
'resetConfig'
);
this
.
$message
({
type
:
'success'
,
message
:
'重置成功!'
...
...
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