From 64b52fa928e11640e8d6aad49bd39cd27c896543 Mon Sep 17 00:00:00 2001 From: wupengfei <834520024@qq.com> Date: 星期五, 21 二月 2025 18:42:13 +0800 Subject: [PATCH] feat: 订单 --- apps/taro/src/pages/mine/index.vue | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/taro/src/pages/mine/index.vue b/apps/taro/src/pages/mine/index.vue index 464499e..2717095 100644 --- a/apps/taro/src/pages/mine/index.vue +++ b/apps/taro/src/pages/mine/index.vue @@ -20,6 +20,7 @@ <ContentScrollView> <List class="mine-list-wrapper"> <ListItem title="璁㈠崟绠$悊" @click="goOrderManage"></ListItem> + <ListItem v-if="isLogin" title="閫�鍑虹櫥褰�" @click="goLogout"></ListItem> </List> </ContentScrollView> </PageLayoutWithBg> @@ -27,16 +28,19 @@ <script setup lang="ts"> import { TransparentNavigationBar, List, ListItem } from '@/components'; -import { useUser, useIsLogin, useGoLogin } from '@/hooks'; +import { useUser, useIsLogin, useGoLogin, useAccessLogin } from '@/hooks'; import Taro from '@tarojs/taro'; import { RouterPath, OssAssets } from '@/constants'; import DefaultAvatar from '@/assets/components/icon-default-avatar.png'; import { useSystemStore } from '@/stores/modules/system'; import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue'; +import { useUserStore } from '@/stores/modules/user'; +import { useUserStoreWithOut } from '@/stores/modules/user'; const { userDetail } = useUser(); const isLogin = useIsLogin(); const systemStore = useSystemStore(); +const userStore = useUserStore(); const { goLoginFn } = useGoLogin(); const bgHeight = computed(() => 133 + systemStore.navHeight); @@ -65,7 +69,12 @@ }; }); -function goOrderManage() {} +const goOrderManage = useAccessLogin(() => goPage(RouterPath.order)); + +function goLogout() { + userStore.logout(); + useUserStoreWithOut().logout(); +} </script> <style lang="scss"> -- Gitblit v1.9.1