From 60b9c62a3165f304a933cbac304ac3d43a24f722 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 17 四月 2025 09:25:09 +0800
Subject: [PATCH] fix: 优化

---
 packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
index 3ed2e0a..7b4588a 100644
--- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
+++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
@@ -51,7 +51,7 @@
                 {{ blLifeRecharge.getRechargeParValue(item, lifePayGasRate) }}鍏�
               </div>
             </div>
-            <div class="discountTag">{{ lifePayGasRate }}鎶�</div>
+            <div class="discountTag" v-if="lifePayGasRate > 0">{{ lifePayGasRate }}鎶�</div>
           </div>
         </NutRadio>
       </NutRadioGroup>
@@ -136,6 +136,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { goTo } = useGasBillRechargeContext();
@@ -207,14 +208,13 @@
 const formRef = ref<any>(null);
 
 function handleSubmit() {
-  if (!form.name) {
-    state.show = true;
-    state.msg = '璇峰厛瀹屽杽鎵�灞炴埛涓诲鍚�';
-    return;
-  }
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });
@@ -227,7 +227,7 @@
 }
 
 const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({
-  getOpenId: props.getOpenId,
+  getOpenId: toRef(props, 'getOpenId'),
   isInWeChat: toRef(props, 'isInWeChat'),
   isH5: toRef(props, 'isH5'),
   appId: toRef(props, 'appId'),
@@ -246,7 +246,7 @@
         gasAccount: form.gasAccount,
         province: form.areaList?.[0] ?? '',
         city: form.areaList?.[1] ?? '',
-        name: form.name,
+        // name: form.name,
       },
     };
     let res = await blLifeRecharge.services.createLifePayGasOrder(params);

--
Gitblit v1.9.1