fix
This commit is contained in:
104
src/component/Account/message/newFollow.vue
Normal file
104
src/component/Account/message/newFollow.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div class="account_systemMessage">
|
||||
<div class="account_systemMessage_title modal_title_text">
|
||||
系统消息
|
||||
</div>
|
||||
<div class="account_systemMessage_item modal_title_text">
|
||||
<div class="account_systemMessage_item_title">
|
||||
<div>Open Call for International Young Fashion Talent</div>
|
||||
<div class="modal_title_text_intro">31 Aug 2024</div>
|
||||
</div>
|
||||
<div class="modal_title_text_intro">
|
||||
10 selected young fashion talent will be mentored by the AiDA development team to learn and explore the possibilities of AiDA. Each selected young fashion talent will create a 4-outfit collection themed “Culture” with AiDA. They will receive full technical support and subsidies for the associated production fee. Selected International/ Mainland young talent will also be able to attend the Culture X AI Internation Fashion Show in Hong Kong that is scheduled on 11 March 2025.
|
||||
<span class="account_systemMessage_item_link">网页链接</span>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div></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'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
const store = useStore();
|
||||
let accountMessage = reactive({
|
||||
activeKey: ref('1'),
|
||||
})
|
||||
// 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 (()=>{
|
||||
})
|
||||
return{
|
||||
...toRefs(accountMessage),
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.account_systemMessage{
|
||||
width: 100%;
|
||||
.account_systemMessage_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 2rem 5rem;
|
||||
border-bottom: 1px solid #e9eaec;
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
.account_systemMessage_title_setting{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.account_systemMessage_item{
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
padding: 5rem 5rem;
|
||||
.account_systemMessage_item_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
.modal_title_text_intro{
|
||||
margin-left: 4rem;
|
||||
}
|
||||
}
|
||||
.account_systemMessage_item_link{
|
||||
color: #39215b;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
438
src/component/Account/message/privateChat.vue
Normal file
438
src/component/Account/message/privateChat.vue
Normal file
@@ -0,0 +1,438 @@
|
||||
<template>
|
||||
<div class="account_privateChatMessage">
|
||||
<div class="account_privateChatMessage_title modal_title_text">
|
||||
私信
|
||||
</div>
|
||||
<div class="account_privateChatMessage_content">
|
||||
<div class="content_left">
|
||||
<div class="content_left_item" v-for="item,index in privateChatList" :class="{active:item.active}" @click.stop="openPrivateChat(item,index)">
|
||||
<div class="content_left_item_btn" @click.stop="deletePrivateChat(item,index)">
|
||||
<i class="fi fi-rr-cross-small"></i>
|
||||
</div>
|
||||
<!-- <img :src="item.img" alt=""> -->
|
||||
<img src="../../../assets/images/homePage/alipay.svg" alt="">
|
||||
<div class="modal_title_text">
|
||||
<div class="modal_title_text_assistant" :title="item.title">{{item.title}}</div>
|
||||
<div class="modal_title_text_intro" :title="item.intro">{{item.intro}}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_right" v-if="currentPrivateChat >= 0">
|
||||
<div class="content_right_top">
|
||||
<div class="modal_title_text">
|
||||
<div class="">{{ privateChat[currentPrivateChat]?.title }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_right_record">
|
||||
<div class="content_right_record_item" v-for="item in privateChat[currentPrivateChat]?.messageList">
|
||||
<div v-if="item.type == 'time'" class="content_right_record_item_time">
|
||||
{{ item.data }}
|
||||
</div>
|
||||
<div v-else class="content_right_record_item_content" :class="{active:item.type == 'user'}">
|
||||
<div class="content_right_record_item_HeadImg">
|
||||
<img src="../../../assets/images/homePage/alipay.svg" alt="">
|
||||
</div>
|
||||
<div class="content_right_record_item_text">
|
||||
{{ item.data }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_right_send">
|
||||
<div class="content_right_operation">
|
||||
<div>icon</div>
|
||||
<div>icon</div>
|
||||
<div>icon</div>
|
||||
</div>
|
||||
<div class="content_right_input">
|
||||
<textarea ref="textarea" v-if="privateChat[currentPrivateChat]?.title" v-model="privateChat[currentPrivateChat].temporary"></textarea>
|
||||
</div>
|
||||
<div class="content_right_btn modal_title_text">
|
||||
<div class="content_right_btn_astrict modal_title_text_intro">
|
||||
<span :style="{color:privateChat[currentPrivateChat]?.temporary.length>500?'red':''}">
|
||||
{{privateChat[currentPrivateChat]?.temporary.length}}
|
||||
</span>
|
||||
/500</div>
|
||||
<div class="content_right_btn_send started_btn" @click="sendCli">发送</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mark_loading" v-show="loadingShow">
|
||||
<a-spin size="large" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content_right content_right_null" v-else>
|
||||
您还未选中或者发起聊天,快去跟好友聊一聊吧
|
||||
</div>
|
||||
</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'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
const store = useStore();
|
||||
let accountPrivateChat:any = reactive({
|
||||
activeKey: ref('1'),
|
||||
privateChatList:[
|
||||
{
|
||||
title:'AI Fashion Designer1',
|
||||
intro:'333',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
active:false,
|
||||
id:1,
|
||||
},
|
||||
{
|
||||
title:'AI Fashion Designer2',
|
||||
intro:'222',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
active:false,
|
||||
id:2,
|
||||
},
|
||||
{
|
||||
title:'AI Fashion Designer3',
|
||||
intro:'111',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
active:false,
|
||||
id:3,
|
||||
}
|
||||
],
|
||||
currentPrivateChat:-1,
|
||||
privateChat:{
|
||||
1:{
|
||||
title:'ABC',
|
||||
temporary:'',
|
||||
messageList:[
|
||||
{
|
||||
type:'time',
|
||||
data:'2022-12-12 12:12:12'
|
||||
},{
|
||||
type:'opposite',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'time',
|
||||
data:'2022-12-22 12:12:12'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},{
|
||||
type:'user',
|
||||
img:'../../../assets/images/homePage/alipay.svg',
|
||||
data:'hello,'
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
})
|
||||
let loadingShow = ref(false)
|
||||
let textarea = ref()
|
||||
// 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)
|
||||
let openPrivateChat = (data:any,index:number)=>{
|
||||
accountPrivateChat.privateChatList.forEach((item:any)=>{
|
||||
item.active = false
|
||||
})
|
||||
// accountPrivateChat.privateChat
|
||||
accountPrivateChat.currentPrivateChat = data.id
|
||||
data.active = true
|
||||
getPrivateChat(data)
|
||||
}
|
||||
let deletePrivateChat = (data:any,index:number)=>{
|
||||
if(data.active){
|
||||
accountPrivateChat.privateChatList[0].active = true
|
||||
getPrivateChat(data)
|
||||
accountPrivateChat.currentPrivateChat = accountPrivateChat.privateChatList[0].id
|
||||
}
|
||||
accountPrivateChat.privateChatList.splice(index,1)
|
||||
}
|
||||
let getPrivateChat = async (data:any)=>{
|
||||
if(!accountPrivateChat.privateChat[data.id]){
|
||||
loadingShow.value = true
|
||||
await new Promise((resolve:any, reject:any) => {
|
||||
setTimeout(()=>{
|
||||
accountPrivateChat.privateChat[data.id] = JSON.parse(JSON.stringify(accountPrivateChat.privateChat[1]))
|
||||
loadingShow.value = false
|
||||
resolve('')
|
||||
},1000)
|
||||
})
|
||||
// Https.axiosGet(Https.httpUrls.accountBindEmail,{}).then((res:any)=>{
|
||||
// console.log(res);
|
||||
// })
|
||||
}
|
||||
nextTick(()=>{
|
||||
if(textarea.value){
|
||||
textarea.value.focus()
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
let sendCli = ()=>{
|
||||
if(accountPrivateChat.privateChat[accountPrivateChat.currentPrivateChat]?.temporary.length>500){
|
||||
return message.info('输入的内容超过最大限制')
|
||||
}
|
||||
}
|
||||
onMounted (()=>{
|
||||
|
||||
})
|
||||
return{
|
||||
...toRefs(accountPrivateChat),
|
||||
loadingShow,
|
||||
textarea,
|
||||
openPrivateChat,
|
||||
deletePrivateChat,
|
||||
sendCli,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.account_privateChatMessage{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.account_privateChatMessage_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 2rem 5rem;
|
||||
border-bottom: 1px solid #e9eaec;
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
.account_privateChatMessage_title_setting{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.account_privateChatMessage_content{
|
||||
flex: 1;
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
.content_left{
|
||||
width: 20%;
|
||||
border-right: 1px solid #e9eaec;
|
||||
height: 100%;
|
||||
.content_left_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 2rem 2rem;
|
||||
padding-left: 0;
|
||||
border-bottom: 1px solid #e9eaec;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
&.active{
|
||||
background: #e4e5e6;
|
||||
}
|
||||
|
||||
img{
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
border-radius: 50%;
|
||||
margin-right: 2rem;
|
||||
}
|
||||
.modal_title_text{
|
||||
width: calc(100% - 6rem - 2rem - 4rem);
|
||||
margin-bottom: 0;
|
||||
div{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
.content_left_item_btn{
|
||||
transform: translateX(-100%);
|
||||
transition: all .3s;
|
||||
i{
|
||||
width: 4rem;
|
||||
height: 4rem;
|
||||
font-size: 3rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.content_left_item:hover{
|
||||
background: #e4e5e6;
|
||||
.content_left_item_btn{
|
||||
transform: translateX(0%);
|
||||
}
|
||||
}
|
||||
}
|
||||
.content_right{
|
||||
width: 80%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f4f5f7;
|
||||
position: relative;
|
||||
.mark_loading{
|
||||
position: absolute;
|
||||
}
|
||||
&.content_right_null{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 3rem;
|
||||
color: #bec9d2;
|
||||
font-weight: 900;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.content_right_top{
|
||||
.modal_title_text{
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
background: #fff;
|
||||
padding: 1.5rem 0
|
||||
}
|
||||
border-bottom: 1px solid #e9eaec;
|
||||
}
|
||||
.content_right_record{
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
max-height: 38.5rem;
|
||||
&.content_right_record::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
.content_right_record_item{
|
||||
display: flex;
|
||||
margin: 2rem 0;
|
||||
padding: 0 2rem;
|
||||
.content_right_record_item_time{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.content_right_record_item_content{
|
||||
display: flex;
|
||||
width: 100%;
|
||||
align-items: flex-start;
|
||||
.content_right_record_item_HeadImg{
|
||||
img{
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
border-radius: 50%;
|
||||
margin-right: 2rem;
|
||||
}
|
||||
}
|
||||
.content_right_record_item_text{
|
||||
background: #fff;
|
||||
padding: 1rem;
|
||||
transform: translateY(1rem);
|
||||
border-radius: 0 2rem 2rem 2rem;
|
||||
}
|
||||
&.active{
|
||||
flex-direction: row-reverse;
|
||||
.content_right_record_item_HeadImg{
|
||||
margin-left: 2rem;
|
||||
margin-right: 0rem;
|
||||
}
|
||||
.content_right_record_item_text{
|
||||
border-radius: 2rem 0rem 2rem 2rem;
|
||||
background: #39215b;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
.content_right_send{
|
||||
border-top: 1px solid #e9eaec;
|
||||
height: 20rem;
|
||||
width: 100%;
|
||||
padding: 1rem 2rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.content_right_operation{
|
||||
height: 4rem;
|
||||
display: flex;
|
||||
div{
|
||||
margin-right: 1rem;
|
||||
}
|
||||
div:last-child{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.content_right_input{
|
||||
flex: 1;
|
||||
textarea{
|
||||
width: 100%;
|
||||
border: none;
|
||||
max-height: 100%;
|
||||
min-height: 100%;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
.content_right_btn{
|
||||
display: flex;
|
||||
margin: 0;
|
||||
margin-left: auto;
|
||||
margin-top: 1rem;
|
||||
.content_right_btn_astrict{
|
||||
margin-right: 2rem;
|
||||
}
|
||||
.content_right_btn_send{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
104
src/component/Account/message/system.vue
Normal file
104
src/component/Account/message/system.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<div class="account_systemMessage">
|
||||
<div class="account_systemMessage_title modal_title_text">
|
||||
系统消息
|
||||
</div>
|
||||
<div class="account_systemMessage_item modal_title_text">
|
||||
<div class="account_systemMessage_item_title">
|
||||
<div>Open Call for International Young Fashion Talent</div>
|
||||
<div class="modal_title_text_intro">31 Aug 2024</div>
|
||||
</div>
|
||||
<div class="modal_title_text_intro">
|
||||
10 selected young fashion talent will be mentored by the AiDA development team to learn and explore the possibilities of AiDA. Each selected young fashion talent will create a 4-outfit collection themed “Culture” with AiDA. They will receive full technical support and subsidies for the associated production fee. Selected International/ Mainland young talent will also be able to attend the Culture X AI Internation Fashion Show in Hong Kong that is scheduled on 11 March 2025.
|
||||
<span class="account_systemMessage_item_link">网页链接</span>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<div></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'
|
||||
export default defineComponent({
|
||||
components:{
|
||||
},
|
||||
setup() {
|
||||
const router = useRouter()
|
||||
const store = useStore();
|
||||
let accountMessage = reactive({
|
||||
activeKey: ref('1'),
|
||||
})
|
||||
// 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 (()=>{
|
||||
})
|
||||
return{
|
||||
...toRefs(accountMessage),
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.account_systemMessage{
|
||||
width: 100%;
|
||||
.account_systemMessage_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 2rem 5rem;
|
||||
border-bottom: 1px solid #e9eaec;
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
.account_systemMessage_title_setting{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.account_systemMessage_item{
|
||||
box-shadow: 0 0px 10px 1px rgba(0, 0, 0, 0.12);
|
||||
border: 1px solid #e9eaec;
|
||||
border-radius: 5px;
|
||||
padding: 5rem 5rem;
|
||||
.account_systemMessage_item_title{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 2rem;
|
||||
.modal_title_text_intro{
|
||||
margin-left: 4rem;
|
||||
}
|
||||
}
|
||||
.account_systemMessage_item_link{
|
||||
color: #39215b;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user