From 80dc90be027ee26869c63860b7d6a0759a03546b Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期二, 20 五月 2025 17:33:53 +0800 Subject: [PATCH] fix: 修改首页ui --- apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue b/apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue index a1b936b..43d37f9 100644 --- a/apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue +++ b/apps/taro/src/subpackages/recharge/phoneBillRecharge/InnerPage.vue @@ -1,15 +1,20 @@ <template> - <ContentScrollView :paddingH="false" style="background-color: #fff"> + <ContentScrollView hasPaddingTop style="background-color: transparent"> <PhoneBillRecharge @goPay="goPay" :isDev="isDev" @paySuccess="handePaySuccess" - :openId="wxOpenId" + :getOpenId="ensureOpenId" :isInWeChat="isInWeChat" :isInAlipay="isInAlipay" :isH5="isWeb" :appId="WXPayAppId" :isFocus="isFocus" + :showAliPay="!isInWeChat" + :showWeixinPay="isInWeChat" + @missName="handleMissName" + @editUserAccount="handleEditUserAccount" + @currentChange="emit('currentChange', $event)" /> </ContentScrollView> </template> @@ -19,16 +24,22 @@ import { BlLifeRecharge } from '@life-payment/core-vue'; import Taro from '@tarojs/taro'; import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env'; -import { useUser, useFocus } from '@/hooks'; +import { useUser, useFocus, useEnsureOpenId } from '@/hooks'; import { WXPayAppId } from '@/constants'; +import { Message } from '@/utils'; defineOptions({ name: 'InnerPage', }); +const emit = defineEmits<{ + (e: 'currentChange', current: 'step1' | 'step2'): void; +}>(); + const isDev = process.env.NODE_ENV === 'development'; const { wxOpenId } = useUser(); +const { ensureOpenId } = useEnsureOpenId(); const { isFocus } = useFocus(); function goPay(orderNo: string) { @@ -42,4 +53,19 @@ url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.璇濊垂璁㈠崟}`, }); } + +async function handleMissName(userAccountId: string) { + try { + await Message.confirm({ message: '璇峰厛瀹屽杽鎵嬫満鍙锋墍灞炴満涓诲鍚�' }); + RouteHelper.navigateTo({ + url: `${RouterPath.editPhoneUserAccount}?id=${userAccountId}`, + }); + } catch (error) {} +} + +function handleEditUserAccount(userAccountId: string) { + RouteHelper.navigateTo({ + url: `${RouterPath.editPhoneUserAccount}?id=${userAccountId}`, + }); +} </script> -- Gitblit v1.9.1