From 13172e75446452388f0e4a0c4aac7e696e1b21da Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 13 三月 2025 14:53:44 +0800
Subject: [PATCH] fix: 二期需求
---
apps/taro/src/pages/home/index.vue | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/apps/taro/src/pages/home/index.vue b/apps/taro/src/pages/home/index.vue
index 49528bf..08b103c 100644
--- a/apps/taro/src/pages/home/index.vue
+++ b/apps/taro/src/pages/home/index.vue
@@ -4,41 +4,39 @@
<RechargeGrid
@phoneBillRecharge="goPhoneBillRecharge"
@electricityBillRecharge="goElectricityBillRecharge"
+ @gasBillRecharge="goGasBillRecharge"
/>
</ContentView>
</PageLayoutWithBg>
</template>
<script setup lang="ts">
-import { useUser, useInfiniteLoading } from '@/hooks';
+import { 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';
+import CustomTabBar from '../../custom-tab-bar/index';
-function goPhoneBillRecharge() {
+const userStore = useUserStore();
+
+const router = Taro.useRouter();
+
+const goPhoneBillRecharge = useAccessLogin(() => {
Taro.navigateTo({
url: `${RouterPath.phoneBillRecharge}`,
- })
- .then(() => {
- console.log('Navigate successfully');
- })
- .catch((err) => {
- console.error('Navigation failed:', err);
- });
-}
-function goElectricityBillRecharge() {
+ });
+});
+const goElectricityBillRecharge = useAccessLogin(() => {
Taro.navigateTo({
url: `${RouterPath.electricBillRecharge}`,
- })
- .then(() => {
- console.log('Navigate successfully');
- })
- .catch((err) => {
- console.error('Navigation failed:', err);
- });
-}
+ });
+});
+const goGasBillRecharge = useAccessLogin(() => {
+ Taro.navigateTo({
+ url: `${RouterPath.gasBillRecharge}`,
+ });
+});
</script>
<style lang="scss">
--
Gitblit v1.9.1