From 456de36d8e21416cdd2439437bdfd9460dcd15be Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 21 二月 2025 16:35:24 +0800
Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentFront

---
 apps/taro/src/pages/home/index.vue |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/apps/taro/src/pages/home/index.vue b/apps/taro/src/pages/home/index.vue
index 44c8fdb..aba6441 100644
--- a/apps/taro/src/pages/home/index.vue
+++ b/apps/taro/src/pages/home/index.vue
@@ -1,30 +1,32 @@
 <template>
   <PageLayoutWithBg class="index-page-wrapper" :title="'鐢熸椿缂磋垂'" :need-auth="false">
     <ContentView>
-      <RechargeGrid @phoneBillRecharge="goPhoneBillRecharge" />
+      <RechargeGrid
+        @phoneBillRecharge="goPhoneBillRecharge"
+        @electricityBillRecharge="goElectricityBillRecharge"
+      />
     </ContentView>
   </PageLayoutWithBg>
 </template>
 
 <script setup lang="ts">
-import { useUser, useInfiniteLoading } from '@/hooks';
+import { useUser, useAccessLogin } from '@/hooks';
 import { useUserStore } from '@/stores/modules/user';
 import Taro from '@tarojs/taro';
 import IconLogo from '@/assets/home/icon-logo.png';
 import { OrderInputType } from '@life-payment/constants';
 import { RechargeGrid } from '@life-payment/components';
 
-function goPhoneBillRecharge() {
+const goPhoneBillRecharge = useAccessLogin(() => {
   Taro.navigateTo({
-    url: RouterPath.phoneBillRecharge,
-  })
-    .then(() => {
-      console.log('Navigate successfully');
-    })
-    .catch((err) => {
-      console.error('Navigation failed:', err);
-    });
-}
+    url: `${RouterPath.phoneBillRecharge}`,
+  });
+});
+const goElectricityBillRecharge = useAccessLogin(() => {
+  Taro.navigateTo({
+    url: `${RouterPath.electricBillRecharge}`,
+  });
+});
 </script>
 
 <style lang="scss">

--
Gitblit v1.9.1