<template>
|
<PageLayoutWithBg class="mine-page-wrapper" title="我的" :need-auth="false">
|
<template #navigationBar>
|
<TransparentNavigationBar
|
title="个人中心"
|
:is-absolute="false"
|
mode="dark"
|
></TransparentNavigationBar>
|
</template>
|
<template #bg>
|
<img :src="OssAssets.mine.Bg" class="mine-page-bg" :style="{ height: `${bgHeight}px` }" />
|
</template>
|
</PageLayoutWithBg>
|
</template>
|
|
<script setup lang="ts">
|
import { TransparentNavigationBar, ContentScrollView } from '@/components';
|
import { useUser, useIsLogin, useGoLogin } from '@/hooks';
|
import Taro from '@tarojs/taro';
|
import { RouterPath, OssAssets } from '@/constants';
|
import { useSystemStore } from '@/stores/modules/system';
|
import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue';
|
|
const { userDetail, isCertified } = useUser();
|
const isLogin = useIsLogin();
|
const systemStore = useSystemStore();
|
|
const { goLoginFn } = useGoLogin();
|
const bgHeight = computed(() => 133 + systemStore.navHeight);
|
|
function goLogin() {
|
if (!isLogin.value) {
|
goLoginFn();
|
}
|
}
|
|
function goPage(routeName: string) {
|
Taro.navigateTo({
|
url: routeName,
|
});
|
}
|
|
function goSetting() {
|
goPage(RouterPath.setting);
|
}
|
|
Taro.showShareMenu({
|
showShareItems: ['shareAppMessage'],
|
});
|
|
Taro.useShareAppMessage((res) => {
|
return {
|
title: `${userDetail.value?.contacter}名片`,
|
// path: `${RouterPath.userHomePage}?userId=${userDetail.value?.userId}`,
|
imageUrl: userDetail.value?.avatarUrl,
|
};
|
});
|
|
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);
|
}
|
</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>
|