From 73ac6d02a2223f19201426f3c366661d4a8e41bf Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期二, 25 二月 2025 17:14:37 +0800 Subject: [PATCH] Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentFront --- apps/taro/src/pages/home/index.vue | 30 +++++++++++------------------- 1 files changed, 11 insertions(+), 19 deletions(-) diff --git a/apps/taro/src/pages/home/index.vue b/apps/taro/src/pages/home/index.vue index 49528bf..23f4464 100644 --- a/apps/taro/src/pages/home/index.vue +++ b/apps/taro/src/pages/home/index.vue @@ -10,35 +10,27 @@ </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 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); - }); -} + }); +}); </script> <style lang="scss"> -- Gitblit v1.9.1