diff --git a/src/views/lucky/LuckyGiftRangeView.vue b/src/views/lucky/LuckyGiftRangeView.vue index 1c700c3..fbe974c 100644 --- a/src/views/lucky/LuckyGiftRangeView.vue +++ b/src/views/lucky/LuckyGiftRangeView.vue @@ -16,7 +16,7 @@
选择礼物个数区间 - + { this.inquire.gifts = res.data; - this.inquire.value1 = res.data[0].giftId; - luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => { - this.inquire.giftsNum = res.data; - this.inquire.value2 = res.data[0].id; - this.loading = true; - luckyGiftRewardList({ - giftId: this.inquire.value1, - rangeId: this.inquire.value2, - }).then((res) => { - this.inquire.diamond = res.data.giftPrice; - this.inquire.giftExpectation = res.data.expectValue; - this.tableData = res.data.list; - this.loading = false; - }); - }); + this.inquire.value1 = ""; + this.inquire.value2 = ""; + // this.inquire.value1 = res.data[0].giftId; + // luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => { + // this.inquire.giftsNum = res.data; + // this.inquire.value2 = res.data[0].id; + // this.loading = true; + // luckyGiftRewardList({ + // giftId: this.inquire.value1, + // rangeId: this.inquire.value2, + // }).then((res) => { + // this.inquire.diamond = res.data.giftPrice; + // this.inquire.giftExpectation = res.data.expectValue; + // this.tableData = res.data.list; + // this.loading = false; + // }); + // }); }); }, // 外部监听 selectGift(e) { console.log(e); - luckyGiftRangeConfigList({ giftId: e }).then((res) => { + this.inquire.value1 = e; + luckyGiftRangeConfigList({ giftId: this.inquire.value1 }).then((res) => { this.inquire.giftsNum = res.data; - this.inquire.value2 = res.data[0].id; - this.loading = true; - luckyGiftRewardList({ - giftId: e, - rangeId: this.inquire.value2, - }).then((res) => { - this.inquire.diamond = res.data.giftPrice; - this.inquire.giftExpectation = res.data.expectValue; - this.tableData = res.data.list; - this.loading = false; - }); + // this.inquire.value2 = res.data[0].id; + // this.loading = true; + // luckyGiftRewardList({ + // giftId: e, + // rangeId: this.inquire.value2, + // }).then((res) => { + // this.inquire.diamond = res.data.giftPrice; + // this.inquire.giftExpectation = res.data.expectValue; + // this.tableData = res.data.list; + // this.loading = false; + // }); + }); + }, + // 外部监听2 + selectGift2(e) { + this.inquire.value2 = e; + this.loading = true; + luckyGiftRewardList({ + giftId: this.inquire.value1, + rangeId: this.inquire.value2, + }).then((res) => { + this.inquire.diamond = res.data.giftPrice; + this.inquire.giftExpectation = res.data.expectValue; + this.tableData = res.data.list; + this.loading = false; }); }, // 监听弹窗数值变化1 @@ -467,7 +484,15 @@ export default { } this.detailsDialog = false; }); - this.getFun(); + luckyGiftRewardList({ + giftId: this.inquire.value1, + rangeId: this.inquire.value2, + }).then((res) => { + this.inquire.diamond = res.data.giftPrice; + this.inquire.giftExpectation = res.data.expectValue; + this.tableData = res.data.list; + this.loading = false; + }); }, //删除 del(val) { @@ -478,7 +503,15 @@ export default { }) .then(() => { luckyGiftRewardDelete({ id: val.id }).then((res) => { - this.getFun(); + luckyGiftRewardList({ + giftId: this.inquire.value1, + rangeId: this.inquire.value2, + }).then((res) => { + this.inquire.diamond = res.data.giftPrice; + this.inquire.giftExpectation = res.data.expectValue; + this.tableData = res.data.list; + this.loading = false; + }); }); }) .catch(() => {});