From 9b87bcbcad94873dedee7389d1ef9742a8d72c2b Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期五, 21 二月 2025 18:38:57 +0800
Subject: [PATCH] fix: 对接
---
apps/taro/src/pages/home/index.vue | 26 +++++++-------------------
1 files changed, 7 insertions(+), 19 deletions(-)
diff --git a/apps/taro/src/pages/home/index.vue b/apps/taro/src/pages/home/index.vue
index 49528bf..aba6441 100644
--- a/apps/taro/src/pages/home/index.vue
+++ b/apps/taro/src/pages/home/index.vue
@@ -10,35 +10,23 @@
</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);
- });
-}
-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