Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
Lotteryprocedure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
Lotteryprocedure
Commits
7da1fb68
Commit
7da1fb68
authored
Jul 27, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
’addxx
parent
808b1155
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
27 deletions
+62
-27
cjcode/src/utils/api/api.js
cjcode/src/utils/api/api.js
+7
-1
cjcode/src/views/Luckdraw/Luckdraw.css
cjcode/src/views/Luckdraw/Luckdraw.css
+7
-2
cjcode/src/views/Luckdraw/Luckdraw.vue
cjcode/src/views/Luckdraw/Luckdraw.vue
+48
-24
No files found.
cjcode/src/utils/api/api.js
View file @
7da1fb68
...
...
@@ -15,4 +15,10 @@ export function getSignNewList(data) {
*/
export
function
getWinner
(
data
)
{
return
post
(
"
/SignWin/getWinner
"
,
data
,
{
noAuth
:
true
});
}
\ No newline at end of file
}
//获取中奖人员名单
export
function
getWinnerList
(
data
)
{
return
post
(
"
/SignWin/getWinnerList
"
,
data
,
{
noAuth
:
true
});
}
cjcode/src/views/Luckdraw/Luckdraw.css
View file @
7da1fb68
...
...
@@ -192,9 +192,14 @@
height
:
100%
;
box-sizing
:
border-box
;
}
.lottery-win-list
.lottery-winner
ul
{
.lottery-win-list
.lottery-winner
.ul
ul
{
width
:
100%
;
height
:
100%
;
height
:
300px
;
}
.ulul
.lunci
{
color
:
#fff
;
font-size
:
32px
;
font-weight
:
bold
;
}
.lottery-right
.lottery-win-list.lottery-horizontal
.lottery-winner
ul
li
{
...
...
cjcode/src/views/Luckdraw/Luckdraw.vue
View file @
7da1fb68
...
...
@@ -37,7 +37,7 @@
<span
@
click=
"jiaren"
class=
"icon-ctrol icon-plus"
title=
"按上下键增减人数"
></span>
</div>
<div
@
click=
"startchoujiang"
class=
"control-item-btn"
>
<div
class=
"lottery-btn btn-start"
title=
"
按空格键
开始抽奖"
>
</div>
<div
class=
"lottery-btn btn-start"
title=
"开始抽奖"
>
</div>
</div>
</div>
</div>
...
...
@@ -47,11 +47,14 @@
<div
v-show=
"centerDialogVisible==false"
class=
"lottery-side lottery-right"
style=
""
>
<span
class=
"winnernum"
>
中奖名单(
<span
class=
"winnernum_txt"
>
413
</span>
人)
</span>
<span
class=
"winnernum"
>
中奖名单(
<span
class=
"winnernum_txt"
>
{{
userjzlisy
}}
</span>
人)
</span>
<div
class=
"lottery-win-list lottery-horizontal"
>
<div
class=
"lottery-winner"
id=
"lottery-winner"
>
<div
v-for=
"(itema,index) in zjusercount"
:key=
"index"
class=
"ulul"
>
<div
class=
"lunci"
>
第
{{
index
+
1
}}
轮
</div>
<ul
class=
"lottery-win-scroll"
tabindex=
"5000"
>
<li
v-for=
"(item,index) in imitateuserlist"
:key=
"index
"
>
<li
v-for=
"(item,index1) in itema.list"
:key=
"index1
"
>
<div
class=
"lottery-avatar-bd"
>
<div
class=
"lottery-avatar-bg"
>
<img
:src=
"item.avatar"
>
...
...
@@ -63,17 +66,16 @@
ID:
{{
item
.
user_id
}}
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- 右边的 -->
<el-dialog
@
open=
"openrun"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
<el-dialog
@
close=
"close"
@
open=
"openrun"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
:modal-append-to-body=
"false"
title=
""
:visible.sync=
"centerDialogVisible"
width=
"30%"
center
>
<ul
class=
"lottery-scroll"
>
<li
v-for=
"(item,index) in dtuserzj"
:key=
"index"
style=
"width:14%;padding:14% 0 0 0;"
>
...
...
@@ -85,7 +87,7 @@
</li>
</ul>
<div
v-show=
"isshowstop"
class=
"control-item-btn1"
>
<div
@
click=
"stopkaijiang"
class=
"lottery-btn1 btn-stop"
title=
"
按回车键
停止抽奖"
style=
""
>
</div>
<div
@
click=
"stopkaijiang"
class=
"lottery-btn1 btn-stop"
title=
"停止抽奖"
style=
""
>
</div>
</div>
</el-dialog>
...
...
@@ -104,7 +106,7 @@
}
from
"
@/utils/userlist.js
"
let
cls
=
0
;
import
qrcodebox
from
"
@/components/qrcodebox.vue
"
;
import
{
getSignNewList
,
getWinner
}
from
"
@/utils/api/api.js
"
import
{
getSignNewList
,
getWinner
,
getWinnerList
}
from
"
@/utils/api/api.js
"
export
default
{
components
:{
qrcodebox
...
...
@@ -130,12 +132,30 @@
],
dtuserzj
:
[],
//动态中奖用户名单
isshowstop
:
false
,
//是否显示停止按钮
//中奖人员的信息
zjusercount
:
0
,
userjzlisy
:[],
//中奖名单
}
},
created
(){
this
.
initgetdata
();
this
.
getWinnerListfun
();
},
methods
:
{
//获取中奖人员名单
getWinnerListfun
(){
getWinnerList
({
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
this
.
zjusercount
=
res
.
data
.
list
;
this
.
userjzlisy
=
res
.
data
.
count
;
//中奖名单
}
})
},
//获取数据 参会人员的数据
initgetdata
(){
getSignNewList
({
...
...
@@ -145,6 +165,11 @@
if
(
res
.
code
==
0
){
this
.
Checkuserlist
=
res
.
data
.
list
;
//餐后列表
this
.
usersigcount
=
res
.
data
.
count
;
//人数
setTimeout
(()
=>
{
// let viedeheiht = document.getElementById("divDetail").clientHeight;
// document.getElementById('ddd').scrollTop=viedeheiht+999999;//通过scrollTop设置滚动到100位置
},
1000
)
}
})
},
...
...
@@ -204,7 +229,6 @@
if
(
res
.
code
==
0
){
this
.
dtuserzj
=
[];
//设置最后的结果
clearInterval
(
cls
);
//清除定时器
cls
=
0
;
//去除事件id
this
.
isshowstop
=
false
;
//隐藏停止按钮
this
.
dtuserzj
=
res
.
data
;
//赋值中奖名单
}
else
{
...
...
@@ -218,13 +242,13 @@
},
//打开弹窗的回调
openrun
()
{
this
.
getWinnerListfun
();
},
//Dialog 关闭的回调
close
()
{
clearInterval
(
cls
);
cls
=
0
;
this
.
isshowstop
=
false
;
this
.
getWinnerListfun
();
}
}
}
...
...
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