Commit ec6a4440 authored by fushaowu's avatar fushaowu

feat: + UI修改

parent 02c0a7ce
...@@ -93,15 +93,15 @@ ...@@ -93,15 +93,15 @@
status && window.open('./list.html'); status && window.open('./list.html');
} else { } else {
if(index === 1) { if(index === 1) {
window.open('./lottery.html?num=10&title=一等奖&info=奖品:macpro一部') window.open('./lottery.html?num=10&title=一等奖&info=macpro一部')
return return
} }
if(index === 2) { if(index === 2) {
window.open('./lottery.html?num=20&title=二等奖&info=奖品:mac air一部') window.open('./lottery.html?num=20&title=二等奖&info==mac air一部')
return return
} }
if(index === 3) { if(index === 3) {
window.open('./lottery.html?num=30&title=三等奖&info=奖品:iphone 12一部') window.open('./lottery.html?num=30&title=三等奖&info=iphone 12一部')
return return
} }
if (num && title) { if (num && title) {
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="company">一条网络科技2021年会</div> <div class="company">一条网络科技2021年会</div>
</div> </div>
<div v-if="step !== 1" class="step2"> <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 class="jump-box">
<div v-for="item in activePersonList" class="jump-item">{{item.name}} {{item.firstLevelDepartment}}</div> <div v-for="item in activePersonList" class="jump-item">{{item.name}} {{item.firstLevelDepartment}}</div>
</div> </div>
......
...@@ -51,6 +51,14 @@ let vue = new Vue({ ...@@ -51,6 +51,14 @@ let vue = new Vue({
[...allPersonInfoMap.keys()].forEach(k => this.candidateMap.set(k, allPersonInfoMap.get(k))); [...allPersonInfoMap.keys()].forEach(k => this.candidateMap.set(k, allPersonInfoMap.get(k)));
if (winPersonStr) { if (winPersonStr) {
let winPerson = JSON.parse(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) { for (const key in winPerson) {
winPerson[key].forEach(val => { winPerson[key].forEach(val => {
this.candidateMap.delete(val.name); this.candidateMap.delete(val.name);
...@@ -153,7 +161,7 @@ function uploadLog(title, list) { ...@@ -153,7 +161,7 @@ function uploadLog(title, list) {
let img = document.createElement('img') let img = document.createElement('img')
let imgPath = 'https://l.yit.com/yd.gif' let imgPath = 'https://l.yit.com/yd.gif'
let params = `err_ctype=lottery&err_stack=${winPerson}` let params = `err_ctype=lottery&err_stack=${winPerson}`
img.src = `${imgPath}?${params}` img.src = window.encodeURI(`${imgPath}?${params}`)
img.style.display = 'none' img.style.display = 'none'
document.querySelector('body').appendChild(img) document.querySelector('body').appendChild(img)
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment