From 9453bef1fc4a3121b28ffa6617f0fbfc81d9f634 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 19 五月 2025 17:35:11 +0800
Subject: [PATCH] fix: 修改首页ui

---
 packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue |   89 +++++++++++++++++++++++---------------------
 1 files changed, 46 insertions(+), 43 deletions(-)

diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
index c9b26ed..1319215 100644
--- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
+++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -6,34 +6,36 @@
     label-position="top"
     class="order-bill-recharge phone"
   >
-    <NutFormItem class="bole-form-item" prop="currentUserAccountId">
-      <NutRadioGroup
-        v-model="form.currentUserAccountId"
-        direction="horizontal"
-        class="par-account-list"
-        v-if="userAccountAllList.length > 0"
-        @change="handleUserAccountChange"
-      >
-        <NutRadio
-          :label="item.id"
-          shape="button"
-          v-for="item in userAccountAllList"
-          :key="item.id"
-          >{{ item.content }}</NutRadio
+    <Chunk borderRadiusSmall>
+      <NutFormItem class="bole-form-item" prop="currentUserAccountId">
+        <NutRadioGroup
+          v-model="form.currentUserAccountId"
+          direction="horizontal"
+          class="par-account-list"
+          v-if="userAccountAllList.length > 0"
+          @change="handleUserAccountChange"
         >
-      </NutRadioGroup>
-      <AccountCard
-        v-if="userAccountAllList.length > 0"
-        title="鍏呭�兼墜鏈哄彿"
-        :content="form.phone"
-        :remark="form.remark"
-      >
-        <template #action>
-          <div class="account-card-action" @click="handleAddUserAccount">鏂板</div>
-        </template>
-      </AccountCard>
-      <AccountAddCard v-else @click="handleAddUserAccount" />
-    </NutFormItem>
+          <NutRadio
+            :label="item.id"
+            shape="button"
+            v-for="item in userAccountAllList"
+            :key="item.id"
+            >{{ item.content }}</NutRadio
+          >
+        </NutRadioGroup>
+        <AccountCard
+          v-if="userAccountAllList.length > 0"
+          title="鍏呭�兼墜鏈哄彿"
+          :content="form.phone"
+          :remark="form.remark"
+        >
+          <template #action>
+            <div class="account-card-action" @click="handleAddUserAccount">鏂板</div>
+          </template>
+        </AccountCard>
+        <AccountAddCard v-else @click="handleAddUserAccount" />
+      </NutFormItem>
+    </Chunk>
 
     <NutFormItem label="閫夋嫨鍏呭�奸噾棰�" class="bole-form-item" prop="parValue" required>
       <NutRadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group">
@@ -55,7 +57,7 @@
                 {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}鍏�
               </div>
             </div>
-            <div class="discountTag">{{ lifePayPhoneRate }}鎶�</div>
+            <div class="discountTag" v-if="lifePayPhoneRate > 0">{{ lifePayPhoneRate }}鎶�</div>
           </div>
         </NutRadio>
       </NutRadioGroup>
@@ -72,7 +74,7 @@
           <div class="recharge-button-text">绔嬪嵆鍏呭��</div>
         </div>
       </nut-button>
-      <RechargeTipsView :tips="tips" />
+      <RechargeTipsView :lifePayOrderType="LifeRechargeConstants.LifePayOrderTypeEnum.璇濊垂璁㈠崟" />
     </div>
     <ConfirmDialog v-model:visible="confirmDialogVisible" @ok="goPay">
       <template #info>
@@ -109,13 +111,13 @@
 import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue';
 import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue';
 import { useGetRate, useGetPhoneParValue, useSetUserAccountBySelect } from '../../hooks';
-import { CustomerServiceTips } from '../../constants';
 import AccountAddCard from '../../components/Card/AccountAddCard.vue';
 import AccountCard from '../../components/Card/AccountCard.vue';
 import { usePhoneBillRechargeContext, PhoneUserAccountExtraProperties } from './context';
 import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue';
 import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType';
 import { RechargeProps } from './types';
+import Chunk from '../../components/Layout/Chunk.vue';
 
 defineOptions({
   name: 'PhoneBillRechargeStep2',
@@ -161,6 +163,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { lifePayPhoneRate } = useGetRate();
@@ -200,19 +203,14 @@
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });
 }
-
-const tips = [
-  '骞冲彴鎻愪緵鎱㈠厖鏈嶅姟锛岃鍗曟彁浜ゅ悗锛岃瘽璐瑰皢浜�0 - 24灏忔椂鍐呭埌璐︺�傝嫢鏈兘鎸夋椂鍒拌处锛岀郴缁熷皢鑷姩鍙戣捣閫�娆俱��',
-  '鍏呭�兼湡闂达紝鑻ュ悓涓�鍙风爜娆鹃」鏈埌璐︼紝璇峰嬁鍦ㄥ叾浠栧钩鍙伴噸澶嶅厖鍊硷紱涓诲壇鍗′笉鍙悓鏃跺厖鍊笺�傚洜涓婅堪鎿嶄綔瀵艰嚧鐨勮祫閲戞崯澶憋紝鐢辩敤鎴疯嚜琛屾壙鎷呫��',
-  '鏈钩鍙拌瘽璐瑰厖鍊兼湇鍔′笉閫傜敤浜庡凡鍋滄満鍙风爜銆傜數淇″彿鐮佽嫢鏈夋瑺璐癸紝涔熸棤娉曞畬鎴愬厖鍊笺�傜數淇″凡瀹屾垚缁存姢鐨勫尯鍩熷寘鎷細骞夸笢銆佹睙鑻忋�佹箹鍖椼�佸洓宸濄�佹睙瑗裤�佹渤鍖椼�佹渤鍗椼�佺寤恒�佽窘瀹併�傚叾瀹冨尯鍩熸鍦ㄥ垎鎵规杩涜缁存姢涓紝鍦ㄦ鏈熼棿鍙兘浼氬嚭鐜板厖鍊间笉鎴愬姛骞惰嚜鍔ㄩ��娆剧殑鎯呭喌锛岃鎮ㄨ皡瑙c��',
-  '濡傛帴鍒伴檶鐢熸潵鐢碉紝瀵规柟浠ョ即璐规垨璇搷浣滅瓑鐞嗙敱瑕佹眰澶勭悊娆鹃」锛屽姟蹇呯珛鍗虫媺榛戯紝璋ㄩ槻璇堥獥銆�',
-  '鍏呭�煎彂绁ㄧ敱杩愯惀鍟嗘彁渚涳紝鎮ㄥ彲鐧诲綍缃戜笂钀ヤ笟鍘呬笅杞界數瀛愬彂绁ㄣ��',
-  CustomerServiceTips,
-];
 
 const confirmDialogVisible = ref(false);
 
@@ -221,7 +219,7 @@
 }
 
 const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({
-  openId: toRef(props, 'openId'),
+  getOpenId: toRef(props, 'getOpenId'),
   isInWeChat: toRef(props, 'isInWeChat'),
   isH5: toRef(props, 'isH5'),
   appId: toRef(props, 'appId'),
@@ -236,9 +234,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);
@@ -254,7 +252,12 @@
 
 useGetPayStatusByOrderNo({
   orderNo: currentOrderNo,
-  enabled: computed(() => props.isFocus && !!currentOrderNo.value),
+  enabled: computed(
+    () =>
+      form.lifePayType === LifeRechargeConstants.LifePayTypeEnum.WxPay &&
+      props.isFocus &&
+      !!currentOrderNo.value
+  ),
   onPaySuccess: (orderNo) => {
     emit('paySuccess', orderNo);
     currentOrderNo.value = '';

--
Gitblit v1.9.1