|
@@ -249,6 +249,7 @@ export default {
|
|
|
this.clearResult()
|
|
this.clearResult()
|
|
|
this.drawOption = message;
|
|
this.drawOption = message;
|
|
|
this.drawList = [];
|
|
this.drawList = [];
|
|
|
|
|
+ this.count();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -273,7 +274,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
this.bodyListener = (e) => {
|
|
this.bodyListener = (e) => {
|
|
|
- if (e.keyCode === 13 || e.keyCode === 32 && e.target === document.body) {
|
|
|
|
|
|
|
+ if ((e.keyCode === 13 || e.keyCode === 32) && e.target === document.body) {
|
|
|
console.log("enter");
|
|
console.log("enter");
|
|
|
this.draw();
|
|
this.draw();
|
|
|
}
|
|
}
|
|
@@ -322,6 +323,7 @@ export default {
|
|
|
this.drawOption.prize_name = params.name;
|
|
this.drawOption.prize_name = params.name;
|
|
|
this.drawOption.prize_id = params.id;
|
|
this.drawOption.prize_id = params.id;
|
|
|
this.showDraw();
|
|
this.showDraw();
|
|
|
|
|
+ this.count();
|
|
|
} else {
|
|
} else {
|
|
|
this.showDrawError();
|
|
this.showDrawError();
|
|
|
}
|
|
}
|
|
@@ -349,7 +351,7 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
recieve(e) {
|
|
recieve(e) {
|
|
|
- e.target.blur();
|
|
|
|
|
|
|
+ e.currentTarget.blur();
|
|
|
if (this.isDrawn) {
|
|
if (this.isDrawn) {
|
|
|
var idList = [];
|
|
var idList = [];
|
|
|
this.drawList.forEach(element => {
|
|
this.drawList.forEach(element => {
|
|
@@ -364,12 +366,13 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
console.log("store error");
|
|
console.log("store error");
|
|
|
}
|
|
}
|
|
|
|
|
+ this.count();
|
|
|
this.clearResult();
|
|
this.clearResult();
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
restart(e) {
|
|
restart(e) {
|
|
|
- e.target.blur();
|
|
|
|
|
|
|
+ e.currentTarget.blur();
|
|
|
if (this.isDrawn) {
|
|
if (this.isDrawn) {
|
|
|
var idList = [];
|
|
var idList = [];
|
|
|
this.drawList.forEach(element => {
|
|
this.drawList.forEach(element => {
|
|
@@ -445,7 +448,7 @@ export default {
|
|
|
this.isDrawn = false;
|
|
this.isDrawn = false;
|
|
|
},
|
|
},
|
|
|
count() {
|
|
count() {
|
|
|
- useJwt.postData('/api/prize/count_by_prize', { prize_id: this.prizeId }).then(res => {
|
|
|
|
|
|
|
+ useJwt.postData('/api/prize/count_by_prize', { prize_id: this.drawOption.prize_id }).then(res => {
|
|
|
this.drawnCount = res.data.drawnCount;
|
|
this.drawnCount = res.data.drawnCount;
|
|
|
this.notDrawnCount = res.data.notDrawnCount;
|
|
this.notDrawnCount = res.data.notDrawnCount;
|
|
|
});
|
|
});
|