You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

195 lines
4.2 KiB

<template>
<div class="my-page app_content">
<!-- 顶部蓝色背景区域 -->
<div class="header-bg">
<div class="user-info">
<div class="avatar-wrapper">
<!-- <img class="avatar" src="https://picsum.photos/120/120?random=avatar" alt="avatar" /> -->
<div class="avatar"></div>
</div>
<div class="user-name">{{ useCommon.enterpriseName}}</div>
<div class="user-phone">电话{{ phoneNumber }}</div>
</div>
</div>
<!-- 内容区域 -->
<div class="content-area">
<!-- 菜单列表 -->
<div class="menu-list">
<div class="menu-item" @click="toComplaintSuggestion">
<div class="menu-icon icon-blue">
</div>
<div class="menu-text">投诉建议</div>
<van-icon name="arrow" class="menu-arrow" />
</div>
<div class="menu-item" @click="toSettings">
<div class="menu-icon icon-purple">
</div>
<div class="menu-text">信息修改</div>
<van-icon name="arrow" class="menu-arrow" />
</div>
</div>
</div>
<!-- 底部导航栏 -->
<div class="footer_body">
<footer-nav></footer-nav>
</div>
</div>
</template>
<script setup name="myPage">
import { computed } from 'vue';
const { useCommon } = $globalStore;
const router = useRouter();
const phoneNumber = computed(() => useCommon.phonenumber);
// ========== 跳转投诉建议 ==========
const toComplaintSuggestion = () => {
router.push({
path: '/enterprise/complaintList',
});
};
// ========== 跳转设置 ==========
const toSettings = () => {
router.push({
path: '/enterprise/settings',
});
};
</script>
<style lang="less" scoped>
.my-page {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
background: #fbfdff;
}
/* ===== 顶部蓝色背景区域 ===== */
.header-bg {
padding-top: 26px;
background: url('@/assets/images/bg_msg.jpg') center center no-repeat;
background-size: cover;
height: 270px;
}
.user-info {
display: flex;
flex-direction: column;
align-items: center;
position: relative;
z-index: 1;
}
.avatar-wrapper {
width: 80px;
height: 80px;
border-radius: 50%;
overflow: hidden;
border: 3px solid rgba(255, 255, 255, 0.5);
margin-bottom: 12px;
text-align: center;
line-height: 80px;
color: #fff;
background: #1989fa;
.avatar{
font-size:38px;
}
}
.user-name {
font-weight: bold;
color: #000;
margin-bottom: 6px;
// text-shadow: 0 1px 4px rgba(0,0,0,0.15);
font-size: 20px;
}
.user-phone {
font-size: 14px;
color: #8d8d8d;
}
/* ===== 内容区域 ===== */
.content-area {
flex: 1;
overflow-y: auto;
position: relative;
z-index: 2;
margin-top: -10px;
background: #fbfdff;
border-radius: 12px 12px 0 0;
padding: 16px;
top: -92px;
}
/* ===== 菜单列表 ===== */
.menu-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.menu-item {
display: flex;
align-items: center;
padding: 16px;
background: #fff;
border-radius: 6px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
&:active {
background: #f5f5f5;
}
}
.menu-icon {
width: 40px;
height: 40px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12px;
svg {
width: 22px;
height: 22px;
color: #fff;
}
}
.icon-blue {
background: url('../../../assets/images/icon_tsjy.png') center center no-repeat;
background-size: 100% 100%;
}
.icon-purple {
background: url('../../../assets/images/icon_set.png') center center no-repeat;
background-size: 100% 100%;
}
.menu-text {
flex: 1;
font-size: 16px;
color: #1a1a1a;
font-weight: 500;
}
.menu-arrow {
font-size: 16px;
color: #ccc;
}
/* ===== 底部导航 ===== */
.footer_body {
flex-shrink: 0;
}
</style>