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/PhoneBillRecharge/PhoneBillRechargeStep2.vue |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
index 0b56538..099fdef 100644
--- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
+++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -55,7 +55,7 @@
                 {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}鍏�
               </div>
             </div>
-            <div class="discountTag">{{ lifePayPhoneRate }}鎶�</div>
+            <div class="discountTag" v-if="lifePayPhoneRate > 0">{{ lifePayPhoneRate }}鎶�</div>
           </div>
         </NutRadio>
       </NutRadioGroup>
@@ -160,6 +160,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { lifePayPhoneRate } = useGetRate();
@@ -199,6 +200,10 @@
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });
@@ -211,7 +216,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'),
@@ -226,9 +231,9 @@
       channelId: blLifeRecharge.accountModel.channlesNum,
       productData: {
         ispCode: form.ispCode,
-        parValue: props.isDev ? 0.1 : form.parValue,
+        parValue: form.parValue,
         phone: form.phone,
-        name: form.ispCode === BlLifeRecharge.constants.IspCode.dianxin ? form.name : '',
+        name: form.name,
       },
     };
     let res = await blLifeRecharge.services.createLifePayPhoneOrder(params);

--
Gitblit v1.9.1