From 8f7bae4a2b70bb3aeb1c2289a7f5dd6a826e88de Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 01 四月 2025 09:55:38 +0800
Subject: [PATCH] fix: 四期需求

---
 apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue |   40 ++++++++++++++++++++++++++++++++++++++--
 1 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue b/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue
index beeabad..a545c37 100644
--- a/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue
+++ b/apps/taro/src/subpackages/recharge/gasBillRecharge/InnerPage.vue
@@ -1,6 +1,19 @@
 <template>
   <ContentScrollView :paddingH="false" style="background-color: #fff">
-    <GasBillRecharge @goPay="goPay" :isDev="isDev" />
+    <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"
+    />
   </ContentScrollView>
 </template>
 
@@ -8,6 +21,10 @@
 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',
@@ -15,9 +32,28 @@
 
 const isDev = process.env.NODE_ENV === 'development';
 
+const { wxOpenId } = useUser();
+const { ensureOpenId } = useEnsureOpenId();
+const { isFocus } = useFocus();
+
 function goPay(orderNo: string) {
-  Taro.navigateTo({
+  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) {}
+}
 </script>

--
Gitblit v1.9.1