|
@@ -51,20 +51,23 @@
|
|
<div class="diamond-icon">
|
|
<div class="diamond-icon">
|
|
<img src="@/assets/images/recharge_zuanshi.png" alt="钻石" class="diamond-img" />
|
|
<img src="@/assets/images/recharge_zuanshi.png" alt="钻石" class="diamond-img" />
|
|
</div>
|
|
</div>
|
|
- <template v-if="!item.isCustom">
|
|
|
|
|
|
+ <!-- 注释掉自定义金额相关显示 -->
|
|
|
|
+ <!-- <template v-if="!item.isCustom"> -->
|
|
<div class="recharge-amount">{{ item.amount }}</div>
|
|
<div class="recharge-amount">{{ item.amount }}</div>
|
|
<div class="recharge-price">¥{{ item.price }}</div>
|
|
<div class="recharge-price">¥{{ item.price }}</div>
|
|
- </template>
|
|
|
|
|
|
+ <!-- </template>
|
|
<template v-else>
|
|
<template v-else>
|
|
<div class="recharge-amount">自定义金额</div>
|
|
<div class="recharge-amount">自定义金额</div>
|
|
<div class="recharge-price">点击输入</div>
|
|
<div class="recharge-price">点击输入</div>
|
|
- </template>
|
|
|
|
|
|
+ </template> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- 注释掉自定义金额输入框
|
|
<div v-if="isCustomSelected" class="custom-input">
|
|
<div v-if="isCustomSelected" class="custom-input">
|
|
<van-field v-model="customAmount" type="number" input-align="center" placeholder="请输入自定义金额(元)" clearable />
|
|
<van-field v-model="customAmount" type="number" input-align="center" placeholder="请输入自定义金额(元)" clearable />
|
|
</div>
|
|
</div>
|
|
|
|
+ -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 支付方式 -->
|
|
<!-- 支付方式 -->
|
|
@@ -152,8 +155,8 @@ export default {
|
|
isLoading: false,
|
|
isLoading: false,
|
|
agreementChecked: false,
|
|
agreementChecked: false,
|
|
agreementVisible: false,
|
|
agreementVisible: false,
|
|
- // 自定义金额
|
|
|
|
- customAmount: '',
|
|
|
|
|
|
+ // 自定义金额 - 已注释功能
|
|
|
|
+ // customAmount: '',
|
|
// 支付方式类型
|
|
// 支付方式类型
|
|
paymentType: PAYMENT_TYPE,
|
|
paymentType: PAYMENT_TYPE,
|
|
// 金币兑换权限
|
|
// 金币兑换权限
|
|
@@ -166,15 +169,18 @@ export default {
|
|
},
|
|
},
|
|
// 显示列表 = 产品列表 + 自定义
|
|
// 显示列表 = 产品列表 + 自定义
|
|
rechargeOptionsWithCustom() {
|
|
rechargeOptionsWithCustom() {
|
|
- if (ALI_CUSTOM && this.paymentType === 'alipay') {
|
|
|
|
|
|
+ // 注释掉自定义金额功能
|
|
|
|
+ /* if (ALI_CUSTOM && this.paymentType === 'alipay') {
|
|
return [...(this.rechargeOptions || []), { isCustom: true }]
|
|
return [...(this.rechargeOptions || []), { isCustom: true }]
|
|
- } else {
|
|
|
|
|
|
+ } else { */
|
|
return [...(this.rechargeOptions || [])]
|
|
return [...(this.rechargeOptions || [])]
|
|
- }
|
|
|
|
|
|
+ // }
|
|
},
|
|
},
|
|
// 是否选择了自定义
|
|
// 是否选择了自定义
|
|
isCustomSelected() {
|
|
isCustomSelected() {
|
|
- return this.selectedRecharge === this.rechargeOptionsWithCustom.length - 1
|
|
|
|
|
|
+ // 注释掉自定义金额功能
|
|
|
|
+ // return this.selectedRecharge === this.rechargeOptionsWithCustom.length - 1
|
|
|
|
+ return false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -297,13 +303,13 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
// 自定义金额校验
|
|
// 自定义金额校验
|
|
- if (this.isCustomSelected) {
|
|
|
|
|
|
+ /* if (this.isCustomSelected) {
|
|
const amountNumber = Number(this.customAmount)
|
|
const amountNumber = Number(this.customAmount)
|
|
if (!this.customAmount || Number.isNaN(amountNumber) || amountNumber <= 0) {
|
|
if (!this.customAmount || Number.isNaN(amountNumber) || amountNumber <= 0) {
|
|
this.$toast('请输入有效的自定义金额')
|
|
this.$toast('请输入有效的自定义金额')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
const selectedOption = this.selectedRechargeOption
|
|
const selectedOption = this.selectedRechargeOption
|
|
|
|
|
|
@@ -356,13 +362,13 @@ export default {
|
|
// 构建支付参数
|
|
// 构建支付参数
|
|
const payData = {
|
|
const payData = {
|
|
userId: this.userInfo.id,
|
|
userId: this.userInfo.id,
|
|
- productId: product && product.isCustom ? 1018 : product.id
|
|
|
|
|
|
+ productId: product ? product.id : null
|
|
}
|
|
}
|
|
|
|
|
|
- // 自定义金额时追加 amount
|
|
|
|
- if (product && product.isCustom) {
|
|
|
|
|
|
+ // 自定义金额时追加 amount - 注释掉自定义金额功能
|
|
|
|
+ /* if (product && product.isCustom) {
|
|
payData.amount = Number(this.customAmount)
|
|
payData.amount = Number(this.customAmount)
|
|
- }
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
// 调用支付宝H5支付接口
|
|
// 调用支付宝H5支付接口
|
|
const res = await aliPayH5(payData, platform)
|
|
const res = await aliPayH5(payData, platform)
|