Compare commits
2 Commits
8502e2d337
...
339dfeeddc
| Author | SHA1 | Date | |
|---|---|---|---|
| 339dfeeddc | |||
| 063dac39e4 |
@@ -2,16 +2,31 @@
|
|||||||
<view class="recharge-page">
|
<view class="recharge-page">
|
||||||
<!-- 自定义导航栏 -->
|
<!-- 自定义导航栏 -->
|
||||||
<nav-bar :title="$t('order.recharge')"></nav-bar>
|
<nav-bar :title="$t('order.recharge')"></nav-bar>
|
||||||
|
<!-- 活动充值金额 -->
|
||||||
|
<view class="block" v-if="eventAmountList.length > 0">
|
||||||
|
<!-- <view class="text">{{$t('order.rechargeAmount')}}</view> -->
|
||||||
|
<view class="text">活动充值金额</view>
|
||||||
|
<view class="recharge">
|
||||||
|
<view class="recharge_block" @click="chosPric(item)"
|
||||||
|
:class="aloneItem.priceTypeId === item.priceTypeId ? 'selected' : ''"
|
||||||
|
v-for="item in eventAmountList" :key="item.priceTypeId">
|
||||||
|
<view class="recharge_money">NZ${{item.realMoney}}</view>
|
||||||
|
<view style="font-size: 26rpx;">{{item.money}}{{ $t('global.coin') }}</view>
|
||||||
|
<span class="activity-label" v-if="item.givejf >0">{{item.description}}</span>
|
||||||
|
<text class="recharge_give"
|
||||||
|
v-if="item.givejf >0">({{$t('order.give')}}{{item.givejf}}{{$t('order.points')}})</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 标准充值金额 -->
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="text">{{$t('order.rechargeAmount')}}</view>
|
<view class="text">{{$t('order.rechargeAmount')}}</view>
|
||||||
<view class="recharge">
|
<view class="recharge">
|
||||||
<view class="recharge_block" @click="chosPric(item)"
|
<view class="recharge_block" @click="chosPric(item)"
|
||||||
:class="aloneItem.priceTypeId === item.priceTypeId ? 'selected' : ''"
|
:class="aloneItem.priceTypeId === item.priceTypeId ? 'selected' : ''"
|
||||||
v-for="item in rechargeList.bookBuyConfigList" :key="item.priceTypeId">
|
v-for="item in standardAmountList" :key="item.priceTypeId">
|
||||||
<view class="recharge_money">NZ${{item.realMoney}}</view>
|
<view class="recharge_money">NZ${{item.realMoney}}</view>
|
||||||
<view style="font-size: 26rpx;">{{item.money}}{{ $t('global.coin') }}</view>
|
<view style="font-size: 26rpx;">{{item.money}}{{ $t('global.coin') }}</view>
|
||||||
<!-- 红框位置的618活动标签 -->
|
|
||||||
<!-- <view class="activity-tag">618活动</view> -->
|
|
||||||
<span class="activity-label" v-if="item.givejf >0">{{item.description}}</span>
|
<span class="activity-label" v-if="item.givejf >0">{{item.description}}</span>
|
||||||
<text class="recharge_give"
|
<text class="recharge_give"
|
||||||
v-if="item.givejf >0">({{$t('order.give')}}{{item.givejf}}{{$t('order.points')}})</text>
|
v-if="item.givejf >0">({{$t('order.give')}}{{item.givejf}}{{$t('order.points')}})</text>
|
||||||
@@ -116,7 +131,10 @@
|
|||||||
const purchaseToken = ref()
|
const purchaseToken = ref()
|
||||||
// 订单编号
|
// 订单编号
|
||||||
const orderSn = ref('')
|
const orderSn = ref('')
|
||||||
|
// 活动充值数据
|
||||||
|
const eventAmountList = ref([])
|
||||||
|
//正常金额数据
|
||||||
|
const standardAmountList = ref([])
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取使用环境
|
* 获取使用环境
|
||||||
@@ -140,8 +158,11 @@
|
|||||||
try {
|
try {
|
||||||
rechargeList.value = await getBookBuyConfigList(type.value, qudao.value)
|
rechargeList.value = await getBookBuyConfigList(type.value, qudao.value)
|
||||||
console.log(rechargeList.value.bookBuyConfigList, '充值列表');
|
console.log(rechargeList.value.bookBuyConfigList, '充值列表');
|
||||||
|
const data = rechargeList.value.bookBuyConfigList
|
||||||
// 默认选择第一个金额
|
// 默认选择第一个金额
|
||||||
aloneItem.value = rechargeList.value.bookBuyConfigList[0]
|
aloneItem.value = data[0]
|
||||||
|
eventAmountList.value = data.filter(item => item.givejf > 0)
|
||||||
|
standardAmountList.value = data.filter(item => item.givejf <= 0)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('获取订单列表失败:', error)
|
console.error('获取订单列表失败:', error)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user