From d654a1cd10555ec529bc3c7955defca0b7813595 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Thu, 19 Sep 2024 15:38:12 +0800 Subject: [PATCH] 9.19 --- .../service/impl/IndexBannerServiceImpl.java | 4 +- .../service/impl/UserBalanceServiceImpl.java | 3 +- gasStation-uni/pages/index/index.vue | 44 +++++++------------ gasStation-uni/pagesHome/MyCard/MyCard.vue | 32 +++++--------- gasStation-uni/pagesHome/QRcode/QRcode.vue | 34 +++++++++++++- 5 files changed, 64 insertions(+), 53 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java index fd2f6992b..476f312df 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/indexBanner/service/impl/IndexBannerServiceImpl.java @@ -54,8 +54,8 @@ public class IndexBannerServiceImpl extends ServiceImpl - - + - + @@ -53,28 +52,20 @@ - - 92#汽油 - ¥8.99 - 0.12%↑ - - - 92#汽油 - ¥8.99 - 0.12%↓ - - - 92#汽油 - ¥8.99 - 0.12%↓ - - - 92#汽油 - ¥8.99 - 0.12%↓ + + + {{item.oilName}}{{item.oilType}} + ¥{{item.oilPrice}} + 0.12%↑ + + - + {{store.name}}{{store.description ? "("+store.description+")" : ""}} @@ -264,7 +255,7 @@ this.isRecharge() // this.getAddress() // this.getUserAuthority() - // this.getIndexBanner() + this.getIndexBanner() }, components: { tabbar @@ -355,7 +346,6 @@ _this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl } } - console.log(_this.list1); } }) } @@ -727,7 +717,7 @@ }) this.columns = [oilData] - + console.log(this.oilTypeList, '728'); } }) }, @@ -1216,4 +1206,4 @@ justify-content: center; color: #fff; } - + \ No newline at end of file diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue index 1c968e58e..f91f813ab 100644 --- a/gasStation-uni/pagesHome/MyCard/MyCard.vue +++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue @@ -11,11 +11,11 @@ 储值卡余额 - ¥123456.98 + ¥{{cardBalance.cardBalance}} - + @@ -29,11 +29,11 @@ 剩余油量 - 123.98L + {{cardBalance.refuelMoney || 0}}L - + @@ -48,9 +48,9 @@ 卡密:xxxxxxxxxxxxxxxxx - + @@ -79,7 +79,7 @@ }, onShow() { this.query.chainStoreId = uni.getStorageSync('chainStoreId'); - // this.getCardFuleRecords(); + this.getCardFuleRecords(); this.getUserBalance() }, methods: { @@ -126,30 +126,20 @@ url: 'business/marketingActivity/cardFuelRecord/queryByPageApplet', method: 'get', }).then(res => { - console.log(res) if (res.code == 200) { this.cardsList = res.data.records - console.log(this.toil, 111, res); + console.log(this.cardsList,'131'); } }) }, getUserBalance() { - this.cardsList = [] request({ url: '/business/userManager/user/getUserBalanceApplet', method: 'get', params: this.query }).then(res => { - console.log(res) if (res.code == 200) { - this.cardBalance = res.data.cardBalance - this.cardsList = JSON.parse(res.data.refuelMoney) - if (this.cardsList.length != 0) { - this.toil = this.cardsList.length - 1 - - } else { - this.toil = this.cardsList.length - } + this.cardBalance = res.data } }) }, diff --git a/gasStation-uni/pagesHome/QRcode/QRcode.vue b/gasStation-uni/pagesHome/QRcode/QRcode.vue index a01da578b..a8ed36558 100644 --- a/gasStation-uni/pagesHome/QRcode/QRcode.vue +++ b/gasStation-uni/pagesHome/QRcode/QRcode.vue @@ -35,9 +35,9 @@ 储值卡 - 余额¥42222.00 + 余额¥{{cardBalance.cardBalance}} - 充值 + 充值 @@ -115,17 +115,37 @@ barCode: "", isLook: false, timer: {}, + cardBalance:{}, } }, onLoad() { this.getBarCode() this.getQrCode() this.countdown() + this.getUserInfo() }, components: { }, methods: { + // 跳转会员充值 + goMemberRecharge() { + uni.navigateTo({ + url: '/pagesHome/memberRecharge/index' + }) + }, + // 查询用户储值卡余额信息 + getUserInfo(){ + request({ + url: '/business/userManager/user/getUserBalanceApplet', + method: 'get', + params: this.query + }).then(res => { + if (res.code == 200) { + this.cardBalance = res.data + } + }) + }, // 是否查看数字 lookNumber() { if (this.isLook) { @@ -202,6 +222,16 @@