Files
aida_front/src/component/Account/account.vue

311 lines
6.8 KiB
Vue
Raw Normal View History

2024-08-05 16:16:08 +08:00
<template>
<div class="account_page">
2024-09-27 16:31:33 +08:00
<!-- <div class="account_page_titleImg">
2024-08-05 16:16:08 +08:00
<img src="https://code-create.com.hk/wp-content/uploads/2022/12/about_banner-1.jpg" alt="">
2024-09-27 16:31:33 +08:00
</div> -->
2024-08-05 16:16:08 +08:00
<div class="account_page_content_box">
2024-12-11 16:26:36 +08:00
<div class="content_item_user">
<div class="content_item_user_left">
<div class="content_item_user_left_detail">
2024-12-18 17:38:43 +08:00
<img :src="userDetail.avatar" alt="">
2024-12-11 16:26:36 +08:00
</div>
<div class="content_item_user_left_detail">
<div class="modal_title_text">
2024-12-18 17:38:43 +08:00
<div>{{ userDetail.userName }}</div>
<div class="modal_title_text_assistant"><span>{{$t('account.email')}}: </span>{{ userDetail.email }}</div>
2024-12-11 16:26:36 +08:00
</div>
<div class="content_item_user_left_detail_bottom">
<div>
2024-12-18 17:38:43 +08:00
<span>{{$t('account.Follow')}}</span>{{ userDetail.followeeCount }}
2024-12-11 16:26:36 +08:00
</div>
<div>
2024-12-18 17:38:43 +08:00
<span>{{$t('account.Fans')}}</span>{{ userDetail.followerCount }}
2024-12-11 16:26:36 +08:00
</div>
</div>
</div>
</div>
</div>
2024-08-05 16:16:08 +08:00
<div class="account_page_content">
<div class="account_page_content_left">
<!-- {{ router.path }} -->
<router-link class="content_left_item" v-for="item in rootSubmenuKeys" :class="{active: $route.path == item.route}" :to="item.route">
<i class="fi" :class="item.icon"></i>
<div>
{{item.name}}
</div>
</router-link>
<!-- <div class="content_left_item" v-for="item in rootSubmenuKeys" :class="{active: $route.path == item.route}">
<i class="fi" :class="item.icon"></i>
<router-link :to="item.route">
{{item.name}}
</router-link>
</div> -->
</div>
<div class="account_page_content_right">
<router-view></router-view>
</div>
</div>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode} from 'vue'
import { Https } from "@/tool/https";
import { Modal,message } from 'ant-design-vue';
import { useRouter,useRoute } from 'vue-router'
import { useStore } from "vuex";
import { useI18n } from 'vue-i18n'
export default defineComponent({
components:{
},
setup() {
2024-09-03 16:39:06 +08:00
const {t} = useI18n()
2024-08-05 16:16:08 +08:00
const store = useStore();
2024-12-18 17:38:43 +08:00
let userDetail= computed(()=>{
return store.state.UserHabit.userDetail
2024-12-11 16:26:36 +08:00
})
2024-08-05 16:16:08 +08:00
let accountHomeData = reactive({
rootSubmenuKeys:[
{
2024-12-11 16:26:36 +08:00
name:t('account.frontPage'),
route:'/home/account/frontPage',
2024-08-05 16:16:08 +08:00
icon:'fi-rr-user'
},{
2024-09-03 16:39:06 +08:00
name:t('account.Messages'),
2024-08-05 16:16:08 +08:00
route:'/home/account/accountMessage',
icon:'fi-rr-envelope'
},{
2024-09-03 16:39:06 +08:00
name:`${t('account.Follow')} ${t('account.Fans')}`,
2024-08-05 16:16:08 +08:00
route:'/home/account/accountFollowFans',
2024-09-03 16:39:06 +08:00
icon:'fi-rr-users-alt'
2024-08-05 16:16:08 +08:00
},
]
})
const router = useRouter()
// provide('exhibitionList',exhibitionList)
let handleClick = (event:any) => {
// state.selectedKeys = [Number(event.key)]
// state.nowPageName = event.item.name
router.push({path:event.item.route})
}
return{
2024-12-18 17:38:43 +08:00
userDetail,
2024-08-05 16:16:08 +08:00
...toRefs(accountHomeData),
router,
handleClick,
}
},
data(){
return{
}
},
})
</script>
<style lang="less" scoped>
.account_page{
height: 100%;
2024-12-11 16:26:36 +08:00
// overflow-y: auto;
padding: 0 30rem;
padding-top: 10rem;
display: flex;
overflow: hidden;
2024-08-05 16:16:08 +08:00
.account_page_titleImg{
img{
width: 100%;
height: 30rem;
object-fit: cover;
}
}
.account_page_content_box{
2024-12-11 16:26:36 +08:00
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
.content_item_user{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 7rem;
.content_item_user_left{
display: flex;
.content_item_user_left_detail{
> .modal_title_text{
margin: 0;
> div{
margin-bottom: 1rem;
}
}
img{
border-radius: 50%;
width: 10rem;
height: 10rem
}
.content_item_user_left_detail_bottom{
display: flex;
font-size: 1.8rem;
>div{
font-weight: 900;
width: 10rem;
span{
font-weight: 600;
color: rgba(0,0,0,.45);
}
}
}
}
.content_item_user_left_detail:last-child{
margin-left: 3rem;
}
}
}
2024-08-05 16:16:08 +08:00
.account_page_content{
display: flex;
2024-12-11 16:26:36 +08:00
flex: 1;
overflow: hidden;
2024-08-05 16:16:08 +08:00
.account_page_content_left{
2024-12-11 16:26:36 +08:00
width: 24rem;
2024-08-05 16:16:08 +08:00
text-align: center;
2024-12-11 16:26:36 +08:00
margin-right: 10rem;
2024-08-05 16:16:08 +08:00
}
.account_page_content_right{
2024-12-11 16:26:36 +08:00
flex: 1;
overflow: hidden;
.account_message{
height: 100%;
:deep(.account_message_body){
height: 100%;
.ant-tabs-content-holder{
flex: 1;
}
.ant-tabs-content{
height: 100%;
overflow-y: auto;
}
}
}
2024-08-05 16:16:08 +08:00
}
.content_left_item{
display: flex;
align-items: center;
2024-12-11 16:26:36 +08:00
height: 6rem;
2024-08-05 16:16:08 +08:00
color: #232323;
div{
2024-09-03 16:39:06 +08:00
white-space: nowrap;
2024-08-05 16:16:08 +08:00
width: 15rem;
2024-12-11 16:26:36 +08:00
color: #999999;
// text-align-last: justify;
text-align: left;
font-size: 2rem;
2024-08-05 16:16:08 +08:00
}
i{
color: #cfcfcf;
2024-12-11 16:26:36 +08:00
font-size: 2rem;
2024-08-05 16:16:08 +08:00
display: flex;
2024-12-11 16:26:36 +08:00
margin: 0 2rem;
2024-08-05 16:16:08 +08:00
}
&.active{
color: #fff;
2024-12-11 16:26:36 +08:00
background: #000;
2024-08-05 16:16:08 +08:00
div{
color: #fff;
font-weight: 900;
}
i{
color: #fff;
}
}
}
}
}
}
</style>
2024-08-23 10:19:02 +08:00
<style lang="less">
.account_generalMessage_title{
display: flex;
align-items: center;
justify-content: space-between;
border-radius: 5px;
position: sticky;
top: 0;
background: #fff;
margin-right: 5rem;
margin-left: 5rem;
2024-10-10 11:32:49 +08:00
&.modal_title_text{
z-index: 2;
}
2024-08-23 10:19:02 +08:00
.account_generalMessage_title_setting{
cursor: pointer;
margin-left: auto
}
.account_generalMessage_title_seach{
display: flex;
input{
padding-left: 1.5rem;
font-size: 1.4rem;
}
.search_icon_block{
background: #39215b;
color: #fff;
padding: .5rem 2rem;
font-size: 1.8rem;
cursor: pointer;
}
}
}
.account_generalMessage_center{
2024-12-11 16:26:36 +08:00
// box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
// border: 1px solid #e9eaec;
2024-08-23 10:19:02 +08:00
border-radius: 5px;
.account_generalMessage_item{
margin-right: 0;
margin-left: 0;
display: flex;
border-radius: 0px;
justify-content: space-between;
align-items: center;
padding: 2rem 5rem;
border: none;
border-bottom: 1px solid #e9eaec;
box-shadow: none;
}
}
.account_generalMessage_item{
border-radius: 5px;
padding: 5rem 5rem;
margin-right: 5rem;
margin-left: 5rem;
position: relative;
cursor: pointer;
.ant-badge{
position: absolute;
transform: translate(-100%, 100%);
top: 0;
right: 0;
}
.account_generalMessage_item_link{
color: #39215b;
cursor: pointer;
font-weight: 600;
}
.account_generalMessage_item_link:hover{
text-decoration: underline;
}
}
.account_generalMessage_item:hover{
background: #efefef;
}
.page_loading_box{
text-align: center;
height: 50px;
.page_loading{
display: block;
width: 50px;
height: 50px;
margin: 0 auto;
}
}
</style>