添加充值页面

This commit is contained in:
wangxiaowei
2025-12-09 23:52:45 +08:00
parent f0d16babf0
commit 5709317af2
7 changed files with 549 additions and 18 deletions

147
bundle/recharge/card.vue Normal file
View File

@ -0,0 +1,147 @@
<template>
<view class="" style="padding-bottom: 20rpx;">
<navbar title="充值卡列表"></navbar>
<view class="card-box">
<view class="card-item">
<image src="@/static/bjk.png" class="card-img" alt="" />
<view class="card-title">白金卡</view>
<view class="card-balance">1602.00</view>
<view class="card-discount">
<text class="card-discount1">9.5</text>
<text class="card-discount2"></text>
</view>
</view>
<view class="card-item">
<image src="@/static/bjk.png" class="card-img" alt="" />
<view class="card-title">白金卡</view>
<view class="card-balance">1602.00</view>
<view class="card-discount">
<text class="card-discount1">9.5</text>
<text class="card-discount2"></text>
</view>
</view>
<view class="card-item">
<image src="@/static/bjk.png" class="card-img" alt="" />
<view class="card-title">白金卡</view>
<view class="card-balance">1602.00</view>
<view class="card-discount">
<text class="card-discount1">9.5</text>
<text class="card-discount2"></text>
</view>
</view>
<view class="card-item">
<image src="@/static/bjk.png" class="card-img" alt="" />
<view class="card-title">白金卡</view>
<view class="card-balance">1602.00</view>
<view class="card-discount">
<text class="card-discount1">9.5</text>
<text class="card-discount2"></text>
</view>
</view>
<view class="card-item">
<image src="@/static/bjk.png" class="card-img" alt="" />
<view class="card-title">白金卡</view>
<view class="card-balance">1602.00</view>
<view class="card-discount">
<text class="card-discount1">9.5</text>
<text class="card-discount2"></text>
</view>
</view>
</view>
</view>
</template>
<script>
import navbar from '@/components/navbar.vue';
export default {
components: {
navbar,
},
data() {
return {}
},
methods: {
// 选择会员卡
selectCard() {
console.log("选择会员卡");
},
// 确认选择
confirmCard() {
console.log("确认选择");
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.card-box {
margin: 40rpx 30rpx;
.card-item {
width: 690rpx;
height: 260rpx;
position: relative;
box-sizing: border-box;
margin-bottom: 20rpx;
.card-img {
width: 690rpx;
height: 260rpx;
}
.card-title {
position: absolute;
top: 42rpx;
left: 38rpx;
font-size: 40rpx;
color: #303133;
line-height: 56rpx
}
.card-balance {
position: absolute;
bottom: 30rpx;
left: 38rpx;
font-weight: 500;
font-size: 40rpx;
color: #303133;
line-height: 56rpx;
}
.card-discount {
position: absolute;
top: 20rpx;
right: 78rpx;
color: #FE6752;
font-weight: bold;
.card-discount1 {
font-size: 44rpx;
margin-right: 10rpx;
}
.card-discount2 {
font-size: 30rpx;
}
}
}
}
</style>

View File

@ -0,0 +1,230 @@
<template>
<view class="">
<navbar title="充值"></navbar>
<view class="recharge-box">
<view class="r-desc">
<view class="r-desc1">请选择充值金额</view>
<view class="r-desc2">充值金额只能消费不能提现</view>
</view>
<view class="bg-white card" @click="selectCard">
<view>
<view class="card-item">
<view class="d-f a-i-c">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
<view class="card-balance">充值1000</view>
</view>
<view class="d-f a-i-c">
<view class="d-f a-i-c">
<view class="sale">
<text>预存享</text>
<text class="discount">9.5</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="card-item">
<view class="d-f a-i-c">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
<view class="card-balance">充值1000</view>
</view>
<view class="d-f a-i-c">
<view class="d-f a-i-c">
<view class="sale">
<text>预存享</text>
<text class="discount">9.5</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="card-item">
<view class="d-f a-i-c">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
<view class="card-balance">充值1000</view>
</view>
<view class="d-f a-i-c">
<view class="d-f a-i-c">
<view class="sale">
<text>预存享</text>
<text class="discount">9.5</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="card-item">
<view class="d-f a-i-c">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
<view class="card-balance">充值1000</view>
</view>
<view class="d-f a-i-c">
<view class="d-f a-i-c">
<view class="sale">
<text>预存享</text>
<text class="discount">9.5</text>
<text></text>
</view>
</view>
</view>
</view>
<view class="card-item active">
<view class="d-f a-i-c">
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
<view class="card-balance">充值1000</view>
</view>
<view class="d-f a-i-c">
<view class="d-f a-i-c">
<view class="sale">
<text>预存享</text>
<text class="discount">9.5</text>
<text></text>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="r-desc">
<view class="r-desc1">充值说明</view>
<view class="r-desc2">a.账户充值仅限在线方式支付充值金额实时到账</view>
<view class="r-desc2">b.有问题请联系客服</view>
</view>
<view class="card-btn" @click="confirmCard">确定</view>
</view>
</view>
</template>
<script>
import navbar from '@/components/navbar.vue';
export default {
components: {
navbar,
},
data() {
return {}
},
methods: {
// 选择会员卡
selectCard() {
console.log("选择会员卡");
},
// 确认选择
confirmCard() {
console.log("确认选择");
}
}
}
</script>
<style lang="scss">
page {
background-color: #fff;
}
.recharge-box {
margin: 0 30rpx;
margin-top: 24rpx;
.r-desc {
.r-desc1 {
font-size: 32rpx;
color: #303133;
line-height: 44rpx;
}
.r-desc2 {
margin-top: 12rpx;
font-size: 26rpx;
color: #909399;
line-height: 36rpx;
}
}
.card {
margin-top: 28rpx;
padding-bottom: 64rpx;
.card-item {
width: 690rpx;
height: 104rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 16rpx 2rpx rgba(0,0,0,0.04);
border-radius: 16rpx;
border: 2rpx solid #fff;
margin: 0 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
.card-title {
font-size: 30rpx;
color: #121212;
margin-right: 24rpx;
}
.sale {
font-size: 28rpx;
.discount {
color: #FF5951;
}
}
.card-balance {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
margin-left: 26rpx;
}
}
.active {
border: 2rpx solid #FF5951;
background: #FFF4F4;
.card-checkout {
.iconfont{
color: #365A9A;
}
}
}
}
.card-btn {
position: fixed;
left: 50%;
transform: translateX(-50%);
bottom: 22rpx;
width: 630rpx;
height: 90rpx;
background: #365A9A;
border-radius: 8rpx;
font-weight: bold;
font-size: 30rpx;
color: #FFFFFF;
line-height: 90rpx;
text-align: center;
}
}
</style>

View File

@ -89,6 +89,38 @@
</view> </view>
</view> </view>
</Popup> </Popup>
<!-- 会员卡选择弹窗 -->
<Popup :show="balancePopup" :width='750' :padding="0" type="bottom" backgroundColor="#fff" radius="32rpx 32rpx 0 0">
<view class="ww100 box-s-b pop-improt typeof pr">
<image style="width: 64rpx;height: 64rpx;position: absolute; top: 26rpx;right: 30rpx;" src="@/static/icon/close2.png" mode="" @click="balancePopup = false"></image>
<view class="d-c-c pt44">
<text class="f34 fb">会员卡选择</text>
</view>
<view class="bg-white card" @click="selectCard">
<view class="card-item">
<view class="d-f a-i-c">
<view class="card-title">白金会员卡</view>
<view class="d-f a-i-c">
<view class="discount">享</view>
<view class="sale">
<text>9.5</text>
<text>折</text>
</view>
</view>
</view>
<view class="d-f a-i-c">
<view class="card-balance">¥212.00</view>
<view class="icon-box d-c-c card-checkout"><span class="icon iconfont icon-xuanze"></span></view>
</view>
</view>
<view class="card-btn" @click="confirmCard">确定</view>
</view>
</view>
</Popup>
<navbar title="确认订单"></navbar> <navbar title="确认订单"></navbar>
@ -179,9 +211,15 @@
<view :class="payType == 'balance' ? 'item active' : 'item'" @tap="payTypeFunc('balance')"> <view :class="payType == 'balance' ? 'item active' : 'item'" @tap="payTypeFunc('balance')">
<view class="d-s-c"> <view class="d-s-c">
<view class="icon-box d-c-c mr10"><span class="icon iconfont icon-yue"></span></view> <view class="icon-box d-c-c mr10"><span class="icon iconfont icon-yue"></span></view>
<text class="key">余额支付(剩余{{balance}})</text> <text class="key">平台余额</text>
</view> </view>
<view class="icon-box d-c-c"><span class="icon iconfont icon-xuanze"></span></view> <view class="d-f a-i-c">
<view class="mr10 dis" v-if="balance > 0">
<!-- <text class="key">余额支付(剩余{{balance}})</text> -->
铂金会员卡 <text style="color: #FF5951;">9.3</text>
</view>
<view class="icon-box d-c-c"><span class="icon iconfont icon-xuanze"></span></view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -246,7 +284,9 @@
order: {}, order: {},
result: '', result: '',
loadding: true, loadding: true,
_submitting: false _submitting: false,
balancePopup: false,
balance: 0
}; };
}, },
@ -286,17 +326,17 @@
// } // }
// 获取余额 // 获取余额
self._post( // self._post(
'user.user/userMoney', // 'user.user/userMoney',
{ // {
app_id: self.getAppId(), // app_id: self.getAppId(),
}, // },
function (res) { // function (res) {
if (res.code) { // if (res.code) {
self.balance = res.data.balance // self.balance = res.data.balance
} // }
} // }
) // )
// 获取场馆详情 // 获取场馆详情
self._post( self._post(
@ -401,6 +441,7 @@
this.billPopup = true; this.billPopup = true;
}, },
// 关闭消费明细
closeBillPopup() { closeBillPopup() {
this.billPopup = false; this.billPopup = false;
this.showPrice = true; this.showPrice = true;
@ -409,7 +450,11 @@
// 选择支付方式 // 选择支付方式
payTypeFunc(n) { payTypeFunc(n) {
this.payType = n; this.payType = n;
this.countPrice() if (n == 'balance') {
this.balancePopup = true;
} else {
this.balancePopup = false;
}
}, },
// 去支付 // 去支付
@ -566,6 +611,16 @@
uni.navigateBack({delta: 1}) uni.navigateBack({delta: 1})
}, 500); }, 500);
} }
},
// 选择会员卡
selectCard() {
this.balance = 200; // 模拟选择会员卡后的余额
},
// 确认选择
confirmCard() {
this.balancePopup = false;
} }
} }
}; };
@ -826,4 +881,86 @@
border-radius: 10rpx; border-radius: 10rpx;
text-align: center; text-align: center;
} }
.dis {
font-size: 28rpx;
color: #303133;
line-height: 40rpx;
}
.card {
margin-top: 28rpx;
padding-bottom: 64rpx;
.card-item {
width: 690rpx;
height: 104rpx;
background: #FFFFFF;
border-radius: 16rpx;
border: 2rpx solid #F4F4F4;
margin: 0 30rpx 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
.card-title {
font-size: 30rpx;
color: #121212;
margin-right: 24rpx;
}
.discount {
width: 44rpx;
height: 44rpx;
line-height: 44rpx;
text-align: center;
border-radius: 100%;
background: #FF5951;
color: #fff;
font-size: 30rpx;
margin-right: 20rpx;
}
.sale {
font-size: 28rpx;
}
.card-balance {
font-size: 30rpx;
color: #303133;
line-height: 42rpx;
margin-right: 28rpx;
}
}
.active {
border: 2rpx solid #FF5951;
background: #FFF4F4;
.card-checkout {
.iconfont{
color: #365A9A;
}
}
}
.card-btn {
width: 630rpx;
height: 90rpx;
background: #365A9A;
border-radius: 8rpx;
font-weight: bold;
font-size: 30rpx;
color: #FFFFFF;
line-height: 90rpx;
text-align: center;
margin: 42rpx auto 0;
}
}
.pt44 {
padding-top: 44rpx;;
}
</style> </style>

View File

@ -1001,6 +1001,18 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "recharge/recharge",
"style": {
"navigationStyle": "custom"
}
},
{
"path": "recharge/card",
"style": {
"navigationStyle": "custom"
}
} }
] ]
}], }],

View File

@ -194,6 +194,11 @@
</view> </view>
</templte> </templte>
<!-- 进行中 -->
<templte class="ww100" v-if="detail.order_status == 2">
<view class="ww100 again-btn" @click="contactStore">联系商家</view>
</templte>
<!-- 订单取消退款成功 --> <!-- 订单取消退款成功 -->
<templte class="ww100" v-if="detail.order_status == 3 || detail.order_status == 4"> <templte class="ww100" v-if="detail.order_status == 3 || detail.order_status == 4">
<view class="ww100 again-btn" @click="againReserve">再次预定</view> <view class="ww100 again-btn" @click="againReserve">再次预定</view>

View File

@ -157,10 +157,10 @@
<!--菜单--> <!--菜单-->
<view class="menu-wrap"> <view class="menu-wrap">
<view class="my-assets-all p-0-30"> <!-- <view class="my-assets-all p-0-30">
<view class="f30 fb">我的服务</view> <view class="f30 fb">我的服务</view>
</view> </view> -->
<view class="group-bd f-w" style="padding: 0 30rpx;"> <view class="group-bd f-w" style="padding: 20rpx 30rpx 0;">
<view :class="'item ' + item.icon + '-box'" v-for="(item, index) in menus" :key="index" <view :class="'item ' + item.icon + '-box'" v-for="(item, index) in menus" :key="index"
@click="jumpPage(item.path)" style="margin-bottom: 30rpx;"> @click="jumpPage(item.path)" style="margin-bottom: 30rpx;">
<view class="d-b-c" style="width: 100%;"> <view class="d-b-c" style="width: 100%;">

BIN
static/bjk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB