This commit is contained in:
cun-nan 2024-09-19 15:38:12 +08:00
parent 6a3d7af6c1
commit d654a1cd10
5 changed files with 64 additions and 53 deletions

View File

@ -54,8 +54,8 @@ public class IndexBannerServiceImpl extends ServiceImpl<IndexBannerMapper, Index
int row = 0; int row = 0;
if (StringUtils.isEmpty(indexBanner.getRouteUrl())){ if (StringUtils.isEmpty(indexBanner.getRouteUrl())){
indexBanner.setBannerUrl("http://47.95.206.185:83/topbj.png"); indexBanner.setBannerUrl("http://47.94.122.58:83/appletIndex.png");
indexBanner.setRouteUrl("/pagesHome/Activity/index"); indexBanner.setRouteUrl("/pages/refuel/refuel");
row = baseMapper.insert(indexBanner); row = baseMapper.insert(indexBanner);
}else { }else {
IndexBanner indexBanner1 = this.selectIndexBannerByRouteUrl(indexBanner.getRouteUrl(),storeId); IndexBanner indexBanner1 = this.selectIndexBannerByRouteUrl(indexBanner.getRouteUrl(),storeId);

View File

@ -345,7 +345,8 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
UserBlanceUniVo userBlanceUniVo = new UserBlanceUniVo(); UserBlanceUniVo userBlanceUniVo = new UserBlanceUniVo();
if (ObjectUtil.isNotEmpty(balance)) { if (ObjectUtil.isNotEmpty(balance)) {
userBlanceUniVo = BeanUtil.copyProperties(balance,UserBlanceUniVo.class); userBlanceUniVo = BeanUtil.copyProperties(balance,UserBlanceUniVo.class);
userBlanceUniVo.setAllBalance(balance.getCardBalance()+balance.getGiveAmount()); Double giveAmount = ObjectUtil.isNotEmpty(balance.getGiveAmount()) ? balance.getGiveAmount() : 0;
userBlanceUniVo.setAllBalance(balance.getCardBalance()+ giveAmount);
}else { }else {
userBlanceUniVo.setAllBalance(0.0); userBlanceUniVo.setAllBalance(0.0);
userBlanceUniVo.setCardBalance(0.0); userBlanceUniVo.setCardBalance(0.0);

View File

@ -3,12 +3,11 @@
<view class="container"> <view class="container">
<!-- 顶部 --> <!-- 顶部 -->
<swiper class="swiper" style="width: 100%;height: 160px; border-radius: 6px;overflow: hidden; " circular <swiper class="swiper" style="width: 100%;height: 160px; border-radius: 6px;overflow: hidden; " circular
:indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration"> :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
<swiper-item v-for="(item,index) in 3" :key="index" @click="goPage(item.routeUrl)"> <swiper-item v-for="(item,index) in list1" :key="index" @click="goPage(item.routeUrl)">
<view class="swiper-item uni-bg-red"> <view class="swiper-item uni-bg-red">
<image src="../../static/new/banners.png" style="height: 163px; width: 100%;"></image> <image :src="item.bannerUrl" style="height: 163px; width: 100%;"></image>
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper>
@ -53,28 +52,20 @@
<view class="title-img"> <view class="title-img">
<image src="../../static/new/t1.png" mode=""></image> <image src="../../static/new/t1.png" mode=""></image>
</view> </view>
<view class="_gbox"> <view style="height: 160px;overflow: auto;">
<view class="_ns">92#汽油</view> <view class="_gbox" v-for="(item,index) in oilTypeList" :key="index">
<view class="_ns">¥8.99</view> <view class="_ns">{{item.oilName}}{{item.oilType}}</view>
<view class="_ns _lv">0.12%</view> <view class="_ns">¥{{item.oilPrice}}</view>
</view> <view class="_ns _lv">0.12%</view>
<view class="_gbox"> </view>
<view class="_ns">92#汽油</view> <!-- <view class="_gbox">
<view class="_ns">¥8.99</view> <view class="_ns">92#汽油</view>
<view class="_ns _red">0.12%</view> <view class="_ns">¥8.99</view>
</view> <view class="_ns _red">0.12%</view>
<view class="_gbox"> </view> -->
<view class="_ns">92#汽油</view>
<view class="_ns">¥8.99</view>
<view class="_ns _red">0.12%</view>
</view>
<view class="_gbox">
<view class="_ns">92#汽油</view>
<view class="_ns">¥8.99</view>
<view class="_ns _red">0.12%</view>
</view> </view>
</view> </view>
<view class="station-box" @click="ruleShow = true "> <view class="station-box">
<view class="station-title" style="display: flex;justify-content: space-between;"> <view class="station-title" style="display: flex;justify-content: space-between;">
<view>{{store.name}}{{store.description ? "("+store.description+")" : ""}}</view> <view>{{store.name}}{{store.description ? "("+store.description+")" : ""}}</view>
<view class="lananniu" @click="goGoGo" v-if="distance!=''"> <view class="lananniu" @click="goGoGo" v-if="distance!=''">
@ -264,7 +255,7 @@
this.isRecharge() this.isRecharge()
// this.getAddress() // this.getAddress()
// this.getUserAuthority() // this.getUserAuthority()
// this.getIndexBanner() this.getIndexBanner()
}, },
components: { components: {
tabbar tabbar
@ -355,7 +346,6 @@
_this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl _this.list1[i].bannerUrl = _this.baseUrl + res.data[i].bannerUrl
} }
} }
console.log(_this.list1);
} }
}) })
} }
@ -727,7 +717,7 @@
}) })
this.columns = [oilData] this.columns = [oilData]
console.log(this.oilTypeList, '728');
} }
}) })
}, },
@ -1216,4 +1206,4 @@
justify-content: center; justify-content: center;
color: #fff; color: #fff;
} }
</style> </style>

View File

@ -11,11 +11,11 @@
储值卡余额 储值卡余额
</view> </view>
<view class="card-num"> <view class="card-num">
¥123456.98 ¥{{cardBalance.cardBalance}}
</view> </view>
<view class="r-box"> <!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx NO.xxxxxxxxxxxxxxxxxx
</view> </view> -->
</view> </view>
<view class="card_1"> <view class="card_1">
<view class="top_card"> <view class="top_card">
@ -29,11 +29,11 @@
剩余油量 剩余油量
</view> </view>
<view class="card-num"> <view class="card-num">
123.98L {{cardBalance.refuelMoney || 0}}L
</view> </view>
<view class="r-box"> <!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx NO.xxxxxxxxxxxxxxxxxx
</view> </view> -->
</view> </view>
<view class="card_2"> <view class="card_2">
<view class="top_card"> <view class="top_card">
@ -48,9 +48,9 @@
<view class="card-b"> <view class="card-b">
卡密xxxxxxxxxxxxxxxxx 卡密xxxxxxxxxxxxxxxxx
</view> </view>
<view class="r-box"> <!-- <view class="r-box">
NO.xxxxxxxxxxxxxxxxxx NO.xxxxxxxxxxxxxxxxxx
</view> </view> -->
</view> </view>
</view> </view>
</template> </template>
@ -79,7 +79,7 @@
}, },
onShow() { onShow() {
this.query.chainStoreId = uni.getStorageSync('chainStoreId'); this.query.chainStoreId = uni.getStorageSync('chainStoreId');
// this.getCardFuleRecords(); this.getCardFuleRecords();
this.getUserBalance() this.getUserBalance()
}, },
methods: { methods: {
@ -126,30 +126,20 @@
url: 'business/marketingActivity/cardFuelRecord/queryByPageApplet', url: 'business/marketingActivity/cardFuelRecord/queryByPageApplet',
method: 'get', method: 'get',
}).then(res => { }).then(res => {
console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.cardsList = res.data.records this.cardsList = res.data.records
console.log(this.toil, 111, res); console.log(this.cardsList,'131');
} }
}) })
}, },
getUserBalance() { getUserBalance() {
this.cardsList = []
request({ request({
url: '/business/userManager/user/getUserBalanceApplet', url: '/business/userManager/user/getUserBalanceApplet',
method: 'get', method: 'get',
params: this.query params: this.query
}).then(res => { }).then(res => {
console.log(res)
if (res.code == 200) { if (res.code == 200) {
this.cardBalance = res.data.cardBalance this.cardBalance = res.data
this.cardsList = JSON.parse(res.data.refuelMoney)
if (this.cardsList.length != 0) {
this.toil = this.cardsList.length - 1
} else {
this.toil = this.cardsList.length
}
} }
}) })
}, },

View File

@ -35,9 +35,9 @@
<view class="bottom-box"> <view class="bottom-box">
<view class=""> <view class="">
<view class="h_siz">储值卡</view> <view class="h_siz">储值卡</view>
<view class="">余额42222.00</view> <view class="">余额{{cardBalance.cardBalance}}</view>
</view> </view>
<view class="">充值</view> <view class="button_c" @click="goMemberRecharge()">充值</view>
</view> </view>
</view> </view>
@ -115,17 +115,37 @@
barCode: "", barCode: "",
isLook: false, isLook: false,
timer: {}, timer: {},
cardBalance:{},
} }
}, },
onLoad() { onLoad() {
this.getBarCode() this.getBarCode()
this.getQrCode() this.getQrCode()
this.countdown() this.countdown()
this.getUserInfo()
}, },
components: { components: {
}, },
methods: { 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() { lookNumber() {
if (this.isLook) { if (this.isLook) {
@ -202,6 +222,16 @@
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.button_c{
width: 60px;
height: 30px;
line-height: 30px;
text-align: center;
border-radius: 5px;
background-color: #FF9655;
color: #FFFFFF;
}
.content { .content {
background: #f4f5f6; background: #f4f5f6;
} }