| | |
| | | <template #bg> |
| | | <img :src="OssAssets.mine.Bg" class="mine-page-bg" :style="{ height: `${bgHeight}px` }" /> |
| | | </template> |
| | | <div class="mine-page-top-view" @click="goLogin"> |
| | | <img class="mine-avatar" :src="DefaultAvatar" alt="" /> |
| | | <div class="user-info"> |
| | | <div class="user-info-name" v-if="isLogin">{{ virtualPhoneNumber }}</div> |
| | | <div class="mine-go-login" v-else>登录</div> |
| | | </div> |
| | | </div> |
| | | <ContentScrollView> |
| | | <List class="mine-list-wrapper"> |
| | | <ListItem title="订单管理" @click="goOrderManage"></ListItem> |
| | | <ListItem v-if="isLogin" title="退出登录" @click="goLogout"></ListItem> |
| | | </List> |
| | | </ContentScrollView> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { TransparentNavigationBar, ContentScrollView } from '@/components'; |
| | | import { useUser, useIsLogin, useGoLogin } from '@/hooks'; |
| | | import { TransparentNavigationBar, List, ListItem } from '@/components'; |
| | | 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, isCertified } = useUser(); |
| | | const { userDetail, virtualPhoneNumber } = useUser(); |
| | | const isLogin = useIsLogin(); |
| | | const systemStore = useSystemStore(); |
| | | const userStore = useUserStore(); |
| | | |
| | | const { goLoginFn } = useGoLogin(); |
| | | const bgHeight = computed(() => 133 + systemStore.navHeight); |
| | |
| | | }); |
| | | } |
| | | |
| | | function goSetting() { |
| | | goPage(RouterPath.setting); |
| | | } |
| | | |
| | | Taro.showShareMenu({ |
| | | showShareItems: ['shareAppMessage'], |
| | | }); |
| | |
| | | }; |
| | | }); |
| | | |
| | | function goAuthentication() { |
| | | goPage(RouterPath.authenticationHome); |
| | | } |
| | | function goMineSign() { |
| | | goPage(RouterPath.mineSign); |
| | | } |
| | | function goMineHire() { |
| | | goPage(RouterPath.mineHire); |
| | | } |
| | | function goMineCancel() { |
| | | goPage(RouterPath.mineCancel); |
| | | } |
| | | function goMineCollectTask() { |
| | | goPage(RouterPath.mineCollectTask); |
| | | } |
| | | function goMineAgreementSign() { |
| | | goPage(RouterPath.mineAgreementSign); |
| | | const goOrderManage = useAccessLogin(() => goPage(RouterPath.order)); |
| | | |
| | | function goLogout() { |
| | | userStore.logout(); |
| | | useUserStoreWithOut().logout(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | @import './index.scss'; |
| | | |
| | | .mine-setting-badge { |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .mine-setting-list { |
| | | .pro-list-item-icon { |
| | | width: 48px; |
| | | height: 48px; |
| | | } |
| | | } |
| | | </style> |