From b823ca3d9f2e6dd6cdc2d388576d02c73d5f9896 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 01 十二月 2025 13:20:45 +0800
Subject: [PATCH] release: @life-payment/core v0.0.4
---
packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue | 32 +++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
index be78bf7..ef36068 100644
--- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
+++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
@@ -13,7 +13,7 @@
direction="horizontal"
class="par-account-list"
v-if="userAccountAllList.length > 0"
- @change="handleUserAccountChange"
+ @change="_handleUserAccountChange"
>
<NutRadio
:label="item.id"
@@ -145,6 +145,7 @@
import { RechargeProps } from '../PhoneBillRecharge/types';
import Chunk from '../../components/Layout/Chunk.vue';
import IconSelect from '../../assets/recharge/icon-select.png';
+import { useCheckCanRecharge } from '../../hooks/rate';
defineOptions({
name: 'GasBillRechargeStep3',
@@ -199,7 +200,28 @@
form.parValue = 0;
}
},
+ async getDefaultUserAccount(userAccountList) {
+ await ensureLifePayRateChannelAllList();
+ const defaultUserAccount = userAccountList.find((x) => {
+ const currentUserAccountExtraProperties = JSON.parse(
+ x.extraProperties
+ ) as GasUserAccountExtraProperties;
+ return isCanRecharge(currentUserAccountExtraProperties.gasOrgType);
+ });
+ return defaultUserAccount;
+ },
});
+
+function _handleUserAccountChange(userAccountId: string) {
+ const currentUserAccount = userAccountAllList.value.find((x) => x.id === userAccountId);
+ const currentUserAccountExtraProperties = JSON.parse(
+ currentUserAccount.extraProperties
+ ) as GasUserAccountExtraProperties;
+ if (!checkCanRecharge(currentUserAccountExtraProperties.gasOrgType)) {
+ // return;
+ }
+ handleUserAccountChange(userAccountId);
+}
function handleAddUserAccount() {
goTo('step1');
@@ -257,8 +279,16 @@
const currentOrderNo = ref('');
+const { isCanRecharge, checkCanRecharge, ensureLifePayRateChannelAllList } = useCheckCanRecharge({
+ msg: toRef(state, 'msg'),
+ show: toRef(state, 'show'),
+});
+
async function goPay() {
try {
+ if (!checkCanRecharge(form.gasOrgType)) {
+ return;
+ }
let params: LifeGasDataCreateLifePayOrderInput = {
userId: blLifeRecharge.accountModel.userId,
channelId: blLifeRecharge.accountModel.channlesNum,
--
Gitblit v1.9.1