|
|
@@ -130,7 +130,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- useJwt.postData('/api/activity/getActivity', { id: this.activityId }).then(res => {
|
|
|
+ useJwt.postData('/api/activity/show', { activity_id: this.activityId }).then(res => {
|
|
|
this.activity = res.data;
|
|
|
});
|
|
|
|
|
|
@@ -225,7 +225,7 @@ export default {
|
|
|
draw() {
|
|
|
useJwt.postData('/api/draw/draw_user', { deadline: this.activity.deadline, region: this.region, number: this.drawNumber }).then(res => {
|
|
|
useJwt.postData('/api/prize/prizeDrawable', { prizeId: this.prizeId, number: this.drawNumber }).then(drawable => {
|
|
|
- if (drawable) {
|
|
|
+ if (drawable.data) {
|
|
|
var userIdList=[];
|
|
|
res.data.forEach(element => {
|
|
|
this.drawList.push({ userId: element.user_id, userName: element.name, department: this.departmentList[element.department_id] });
|
|
|
@@ -239,6 +239,7 @@ export default {
|
|
|
this.count(this.drawList);
|
|
|
});
|
|
|
} else {
|
|
|
+ this.hideModal();
|
|
|
console.log("prize is not available.");
|
|
|
}
|
|
|
});
|