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

199 lines
4.8 KiB
Vue
Raw Normal View History

2024-08-13 09:36:13 +08:00
<template>
<div class="otherUsers">
<div class="otherUsers_page_titleImg">
<img src="https://code-create.com.hk/wp-content/uploads/2022/12/about_banner-1.jpg" alt="">
</div>
<div class="otherUsers_userDetail">
<div class="otherUsers_userDetail_img">
<img src="https://code-create.com.hk/wp-content/uploads/2022/12/about_banner-1.jpg" alt="">
</div>
<div class="otherUsers_userDetail_center">
<div class="otherUsers_userDetail_center_name modal_title_text">
<div>用户名</div>
<div class="userDetail_center_name_left">关注</div>
</div>
<div class="otherUsers_userDetail_center_data">
<div class="userDetail_center_data_item modal_title_text">
<div>99999</div>
<span class="modal_title_text_intro">访问量</span>
</div>
<div class="userDetail_center_data_item modal_title_text">
<div>123</div>
<span class="modal_title_text_intro">作品</span>
</div>
<div class="userDetail_center_data_item modal_title_text">
<div>999</div>
<span class="modal_title_text_intro">粉丝</span>
</div>
<div class="userDetail_center_data_item modal_title_text">
<div>22</div>
<span class="modal_title_text_intro">关注</span>
</div>
</div>
<div class="otherUsers_userDetail_center_signature">
<div class="modal_title_text">
<div class="modal_title_text_intro">个性签名个性签名个性签名</div>
</div>
</div>
</div>
</div>
<div class="otherUser_works">
<div class="otherUser_works_title modal_title_text">
<div>他的作品</div>
</div>
<Works :isScroll="false" :otherUsers="true" :userId=userId></Works>
</div>
</div>
</template>
<script lang="ts">
import { defineComponent,computed,ref,reactive,nextTick,toRefs,createVNode, onMounted} from 'vue'
import { Https } from "@/tool/https";
import { useRouter,useRoute } from 'vue-router'
import { Modal,message } from 'ant-design-vue';
import { useStore } from "vuex";
import { setCookie, getCookie, WriteCookie } from "@/tool/cookie";
import { useI18n } from 'vue-i18n'
import Works from '@/views/HomeView/Works.vue';
export default defineComponent({
components:{
Works
},
setup() {
const router:any = useRouter()
const store = useStore();
let otherUsers = reactive({
userId:'0'
})
// let ws = new WebSocket('ws://127.0.0.1:3000')
// console.log(ws);
// ws.onopen = ()=>{
// console.log(222);
// let data = {
// cmd:4,
// data:{
// msg:'222'
// }
// }
// ws.send(JSON.stringify(data))
// // ws.onmessage = (data)=>{
// // console.log(data);
// // }
// }
// provide('exhibitionList',exhibitionList)
onMounted (()=>{
otherUsers.userId = router.currentRoute.value.query?.id
// alert()
})
return{
...toRefs(otherUsers),
}
},
data(){
return{
}
},
})
</script>
<style lang="less" scoped>
.otherUsers{
width: 100%;
height: 100%;
padding: 0 9rem;
display: flex;
flex-direction: column;
overflow-y: auto;
.otherUsers_page_titleImg{
img{
width: 100%;
height: 30rem;
object-fit: cover;
}
}
.otherUsers_userDetail{
padding: 2rem;
display: flex;
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
margin-bottom: 2rem;
.modal_title_text{
margin-bottom: .5rem;
}
.otherUsers_userDetail_img{
width: 10rem;
height: 10rem;
// transform: translateY(-4rem);
margin-right: 4rem;
flex-shrink: 0;
img{
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
}
}
.otherUsers_userDetail_center{
flex: 1;
.otherUsers_userDetail_center_name{
display: flex;
justify-content: space-between;
.userDetail_center_name_left{
padding: .5rem 2rem;
border-radius: 4rem;
border: 2px solid #e9eaec;
cursor: pointer;
}
}
.otherUsers_userDetail_center_data{
display: flex;
.userDetail_center_data_item{
display: flex;
>div{
margin-right: 1rem;
}
}
.userDetail_center_data_item::after{
content: '';
display: block;
width: 1px;
height: 2rem;
background-color: #ccc;
margin: 0 2rem;
}
.userDetail_center_data_item:last-child::after{
display: none;
}
}
.otherUsers_userDetail_center_signature{
>div{
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
}
}
}
.otherUser_works{
height: auto;
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
position: relative;
padding: 0 2rem;
.otherUser_works_title{
padding: 2rem 0;
position: sticky;
top: 0;
background: #fff;
margin: 0;
z-index: 2;
}
.otherUser_works_content{
height: 200px;
width: 100%;
background: #ccc;
}
}
}
</style>