修改bug

This commit is contained in:
齐天大圣 2024-01-05 18:21:15 +08:00
parent 13a435eb17
commit 8dd3c0150d

View File

@ -102,9 +102,15 @@
components: {
},
onShow() {
onLoad() {
this.query.storeId = uni.getStorageSync("storeId")
this.isDrawDown();
this.getGiftRecords()
this.isDrawDown()
this.getAllCardFavorables()
},
onShow() {
console.log(this.query);
},
@ -117,10 +123,14 @@
}).then(res => {
if (res.code == 200) {
this.cardFavorableList = res.data.records;
if (this.cardFavorableList.length == 0) {
this.shows = false
}
// console.log("555" + this.cardFavorableList)
for (var i = 0; i < res.data.records.length; i++) {
this.idList.push(res.data.records[i].id)
}
/* this.cardFavorableList.forEach(item => this.idList.push(item.id));
console.log("333" + idList) */
}
@ -137,6 +147,7 @@
console.log("222" + res)
if (res.code == 200 && res.data == true) {
this.shows = false
this.getGiftRecords()
uni.showToast({
title: '领取成功!'
})
@ -154,19 +165,20 @@
method: 'get',
params: this.query
}).then(res => {
if (res.code == 200 && res.data == true) {
this.shows = true
} else {
this.shows = false
}
this.getGiftRecords();
this.getAllCardFavorables();
})
},
goRecharge(id, cardRecordId) {
uni.navigateTo({
url: '/pagesHome/oilRecharge/oilRecharge?id=0&cardFavorableId=' + id + '&cardRecordId=' +
url: '/pagesHome/oilRecharge/oilRecharge?id=0&cardFavorableId=' + id +
'&cardRecordId=' +
cardRecordId
})
},