This commit is contained in:
cun-nan 2024-10-08 15:25:51 +08:00
parent d7dddcc948
commit 30017f2d21
3 changed files with 51 additions and 14 deletions

View File

@ -85,6 +85,16 @@ public class CardValueController extends BaseController {
return getSuccessResult(this.cardValueService.cardValueList(cardValue));
}
/**
* 查询本站会员充值卡列表小程序
* @param cardValue
* @return
*/
@GetMapping("cardValueLists")
public ResponseObject cardValueLists(@Param("cardValue") CardValue cardValue) {
return getSuccessResult(this.cardValueService.cardValueList(cardValue));
}
/**
* 通过主键查询单条数据
*

View File

@ -348,12 +348,12 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
LambdaQueryWrapper<MtUserFuel> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(MtUserFuel::getStoreId,storeId).eq(MtUserFuel::getMtUserId,nowAccountInfo.getId());
List<MtUserFuel> list = userFuelService.list(queryWrapper);
ljUserVo.setUserFuels(list);
//判断当前用户是否存在车队
List<FleetInfoUniVo> fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId);
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
ljUserVo.setFleetInfoUniVos(fleetInfoUniVos);
}
ljUserVo.setUserFuels(list);
return ljUserVo;
}

View File

@ -58,7 +58,7 @@
<view class="">会员卡类型</view>
<view class="d-bs" style="align-items: center;border-bottom: none;"
@click="cardType = true">
<view style="font-size: 12px;">储值卡余额6532.89</view>
<view style="font-size: 12px;">储值卡余额{{user.cardBalance}}</view>
<view style="line-height: 20px;">
<u-icon name="arrow-right" size="12px"></u-icon>
</view>
@ -203,18 +203,29 @@
<view class="anniubai">充值</view>
</view>
<view class="c_bs">
<view class="">123456.98</view>
<view class="">NO.xxxxxxxxxxxxxxxxx</view>
<view class="">{{user.cardBalance}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
<view class="c_pox" style="background: url('../../static/imgs/tyktc.png'); ">
<view class="c_pox" style="background: url('../../static/imgs/tyktc.png'); "
v-for="(item,index) in oilCardList" :key="index">
<view class="c_bs" style="margin-bottom: 15px; ">
<view class="">囤油卡</view>
<view class="anniubai" style="color: #70D0C7;">充值</view>
</view>
<view class="c_bs">
<view class="">123456.98</view>
<view class="">NO.xxxxxxxxxxxxxxxxx</view>
<view class="">{{item.fuelAmount}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
<view class="c_pox">
<view class="c_bs" style="margin-bottom: 15px;" v-for="(item,index) in fleetList" :key="index">
<view class="">{{item.fleetName}}</view>
<view class="anniubai">充值</view>
</view>
<view class="c_bs">
<view class="">{{item.totalBalance || 0}}</view>
<!-- <view class="">NO.xxxxxxxxxxxxxxxxx</view> -->
</view>
</view>
</view>
@ -262,7 +273,7 @@
<view class="p_ds" style="width: 85%;">
<view class="">
<view class="">消费应支付{{oilOrder.payAmount}}</view>
<view class="sm-size">会员-储值卡余额8900.99</view>
<view class="sm-size">会员-储值卡余额{{user.cardBalance}}</view>
</view>
<view class="anxuan">
<view class="dian"></view>
@ -295,7 +306,7 @@
</view>
<view class="p_bs">
<view class="">加油金额</view>
<view class="">256.89</view>
<view class="">{{oilOrder.orderAmount}}</view>
</view>
<view class="p_x"></view>
<view class="">优惠信息</view>
@ -414,7 +425,10 @@
couponList: [],
//
ifLogin: false,
orderInfo:{},
orderInfo: {},
user: {},
oilCardList: [],
fleetList: []
}
},
components: {
@ -478,10 +492,22 @@
onShow() {
this.getStore(uni.getStorageSync("storeId"));
this.getTheJudgmentIsTheSame()
this.getOilCard()
},
methods: {
//
getOilCard() {
request({
url: "business/userManager/user/storeUserInfo/" + uni.getStorageSync("storeId"),
method: 'get',
}).then(res => {
console.log(res, 491);
this.user = res.data
this.oilCardList = res.data.userFuels
this.fleetList = res.data.fleetInfoUniVos
})
},
//
payment() {
this.ifLogin = this.AppToken ? true : false
@ -577,7 +603,8 @@
success: function(res) {
console.log('success');
uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo,
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.oilOrder.orderNo,
})
},
fail: function(err) {
@ -605,7 +632,8 @@
if (resp.resultCode == '9000') {
console.log("支付成功")
uni.redirectTo({
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo,
url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this
.oilOrder.orderNo,
})
} else {
request({
@ -727,7 +755,6 @@
method: 'post',
data: this.oilOrder,
}).then((res) => {
console.log(res,578);
this.oilOrder = res.data
})
},