From 8f7bae4a2b70bb3aeb1c2289a7f5dd6a826e88de Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 01 四月 2025 09:55:38 +0800
Subject: [PATCH] fix: 四期需求

---
 packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
index 6a1a910..1e6c6c7 100644
--- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
+++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
@@ -138,6 +138,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { goTo } = useElectricBillRechargeContext();
@@ -153,6 +154,7 @@
   currentUserAccountId: '',
   remark: '',
   lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay),
+  name: '',
 });
 
 const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({
@@ -170,6 +172,7 @@
     form.electricAccountType = currentUserAccountExtraProperties.electricAccountType;
     form.sixID = currentUserAccountExtraProperties.sixID;
     form.remark = currentUserAccount.remark;
+    form.name = currentUserAccountExtraProperties.name ?? '';
     const electricParValueItem = electricParValueList.value.find(
       (x) => x.cityName === form.province
     );
@@ -216,6 +219,10 @@
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });
@@ -228,10 +235,10 @@
 }
 
 const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({
-  openId: toRef(props, 'openId'),
   isInWeChat: toRef(props, 'isInWeChat'),
   isH5: toRef(props, 'isH5'),
   appId: toRef(props, 'appId'),
+  getOpenId: toRef(props, 'getOpenId'),
 });
 
 const currentOrderNo = ref('');
@@ -242,13 +249,14 @@
       userId: blLifeRecharge.accountModel.userId,
       channelId: blLifeRecharge.accountModel.channlesNum,
       productData: {
-        parValue: props.isDev ? 0.1 : form.parValue,
+        parValue: form.parValue,
         electricType: form.electricType,
         electricAccountType: form.electricAccountType,
         electricAccount: form.electricAccount,
         province: form.province,
         city: form.city,
         sixID: form.sixID,
+        // name: form.name,
       },
     };
     let res = await blLifeRecharge.services.createLifePayElectricOrder(params);

--
Gitblit v1.9.1