From bd7dd96c732ded6854d47bf77f65e5c64d3d15e2 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期三, 21 五月 2025 13:24:09 +0800 Subject: [PATCH] fix: 修改ui --- apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue | 68 +++++++++++++++++++++++++++++++-- 1 files changed, 63 insertions(+), 5 deletions(-) diff --git a/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue b/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue index 81c8793..cee63c6 100644 --- a/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue +++ b/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue @@ -1,13 +1,71 @@ <template> - <div>鐕冩皵鍏呭��</div> + <ContentScrollView hasPaddingTop style="background-color: transparent"> + <GasBillRecharge + @goPay="goPay" + :isDev="isDev" + @paySuccess="handePaySuccess" + :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> <script setup lang="ts"> +import { GasBillRecharge } from '@life-payment/components'; +import { BlLifeRecharge } from '@life-payment/core-vue'; +import Taro from '@tarojs/taro'; +import { isInAlipay, isInWeChat, isH5, isWeb } from '@/utils/env'; +import { useUser, useFocus, useEnsureOpenId } from '@/hooks'; +import { WXPayAppId } from '@/constants'; +import { Message } from '@/utils'; + defineOptions({ name: 'InnerPage', }); -</script> -<style lang="scss"> -@import '@/styles/common.scss'; -</style> +const emit = defineEmits<{ + (e: 'currentChange', current: 'step1' | 'step2' | 'step3'): void; +}>(); + +const isDev = process.env.NODE_ENV === 'development'; + +const { wxOpenId } = useUser(); +const { ensureOpenId } = useEnsureOpenId(); +const { isFocus } = useFocus(); + +function goPay(orderNo: string) { + RouteHelper.navigateTo({ + url: `${RouterPath.selectPayType}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.鐕冩皵璁㈠崟}`, + }); +} + +function handePaySuccess(orderNo: string) { + RouteHelper.navigateTo({ + url: `${RouterPath.rechargeResult}?orderNo=${orderNo}&lifePayOrderType=${BlLifeRecharge.constants.LifePayOrderTypeEnum.鐕冩皵璁㈠崟}`, + }); +} + +async function handleMissName(userAccountId: string) { + try { + await Message.confirm({ message: '璇峰厛瀹屽杽鎵嬫満鍙锋墍灞炴満涓诲鍚�' }); + RouteHelper.navigateTo({ + url: `${RouterPath.editGasUserAccount}?id=${userAccountId}`, + }); + } catch (error) {} +} + +function handleEditUserAccount(userAccountId: string) { + RouteHelper.navigateTo({ + url: `${RouterPath.editGasUserAccount}?id=${userAccountId}`, + }); +} +</script> -- Gitblit v1.9.1