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
ec6a4440
Commit
ec6a4440
authored
Jan 07, 2021
by
fushaowu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: + UI修改
parent
02c0a7ce
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
admin.html
src/admin.html
+3
-3
lottery.html
src/lottery.html
+1
-1
lottery.js
src/lottery.js
+9
-1
No files found.
src/admin.html
View file @
ec6a4440
...
...
@@ -93,15 +93,15 @@
status
&&
window
.
open
(
'./list.html'
);
}
else
{
if
(
index
===
1
)
{
window
.
open
(
'./lottery.html?num=10&title=一等奖&info=
奖品:
macpro一部'
)
window
.
open
(
'./lottery.html?num=10&title=一等奖&info=macpro一部'
)
return
}
if
(
index
===
2
)
{
window
.
open
(
'./lottery.html?num=20&title=二等奖&info=
奖品:
mac air一部'
)
window
.
open
(
'./lottery.html?num=20&title=二等奖&info=
=
mac air一部'
)
return
}
if
(
index
===
3
)
{
window
.
open
(
'./lottery.html?num=30&title=三等奖&info=
奖品:
iphone 12一部'
)
window
.
open
(
'./lottery.html?num=30&title=三等奖&info=iphone 12一部'
)
return
}
if
(
num
&&
title
)
{
...
...
src/lottery.html
View file @
ec6a4440
...
...
@@ -20,7 +20,7 @@
<div
class=
"company"
>
一条网络科技2021年会
</div>
</div>
<div
v-if=
"step !== 1"
class=
"step2"
>
<h3
class=
"jump-title"
>
{{lotteryStatus ?
'恭喜获奖员工' : '幸运员工 抽奖中...'
}}
</h3>
<h3
class=
"jump-title"
>
{{lotteryStatus ?
`恭喜${awardTitle}获奖员工` : `${awardTitle}幸运员工 抽奖中...`
}}
</h3>
<div
class=
"jump-box"
>
<div
v-for=
"item in activePersonList"
class=
"jump-item"
>
{{item.name}} {{item.firstLevelDepartment}}
</div>
</div>
...
...
src/lottery.js
View file @
ec6a4440
...
...
@@ -51,6 +51,14 @@ let vue = new Vue({
[...
allPersonInfoMap
.
keys
()].
forEach
(
k
=>
this
.
candidateMap
.
set
(
k
,
allPersonInfoMap
.
get
(
k
)));
if
(
winPersonStr
)
{
let
winPerson
=
JSON
.
parse
(
winPersonStr
);
if
(
winPerson
[
this
.
awardTitle
])
{
let
status
=
window
.
confirm
(
'该奖项已经抽过,是否跳转至抽奖结果页面'
);
this
.
step
=
1
if
(
status
)
{
window
.
open
(
'./list.html'
);
}
return
}
for
(
const
key
in
winPerson
)
{
winPerson
[
key
].
forEach
(
val
=>
{
this
.
candidateMap
.
delete
(
val
.
name
);
...
...
@@ -153,7 +161,7 @@ function uploadLog(title, list) {
let
img
=
document
.
createElement
(
'img'
)
let
imgPath
=
'https://l.yit.com/yd.gif'
let
params
=
`err_ctype=lottery&err_stack=
${
winPerson
}
`
img
.
src
=
`
${
imgPath
}
?
${
params
}
`
img
.
src
=
window
.
encodeURI
(
`
${
imgPath
}
?
${
params
}
`
)
img
.
style
.
display
=
'none'
document
.
querySelector
(
'body'
).
appendChild
(
img
)
})
...
...
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