From b2a9c4e37631211246d7443c69743140743b47a8 Mon Sep 17 00:00:00 2001
From: Dragon <13925835632@139.com>
Date: Thu, 21 Mar 2024 18:57:57 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/lucky/LuckyGiftRangeView.vue | 93 +++++++++++++++++---------
1 file changed, 63 insertions(+), 30 deletions(-)
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(() => {});