会话存档

This commit is contained in:
liuye
2023-07-17 15:20:36 +08:00
parent 45b88419a0
commit d14e7b3ab5
4 changed files with 561 additions and 247 deletions

View File

@@ -20,12 +20,12 @@
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scroll="scroll" v-if="list.length" :style="{height: scrollHeight+'px'}">
<div class="conversation-list">
<div v-for="(item, index) in list" :key="index">
<div class="item" :class="item.userId == user.wxUserId ? 'item-right' : 'item-left'">
<div class="item" :class="item.userId == id ? 'item-right' : 'item-left'">
<!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId == user.wxUserId"> -->
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != user.wxUserId && item.userAvatar">
<img src="./img/user-img.png" alt="" class="user-img" v-if="item.userId != user.wxUserId && !item.userAvatar">
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId != id && item.userAvatar">
<img src="./img/user-img.png" alt="" class="user-img" v-if="item.userId != id && !item.userAvatar">
<p class="user-name">{{item.userName}}<span>{{item.msgSendTime}}</span></p>
@@ -111,7 +111,7 @@
</div>
</div>
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == user.wxUserId">
<img :src="item.userAvatar" alt="" class="user-img" v-if="item.userId == id">
<!-- <img src="./img/fail-icon.png" alt="" class="fail-img" v-if="item.userId != user.wxUserId"> -->
</div>
@@ -158,7 +158,8 @@ export default {
dateList: [],
scrollTop: 0,
scrollHeight: '',
preveHeight: ''
preveHeight: '',
id: ''
};
},
computed: {
@@ -171,6 +172,7 @@ export default {
this.roomId = option.roomId
}
this.type = option.type
this.id = option.id
this.getList()
console.log()
this.scrollHeight = uni.getSystemInfoSync().windowHeight - 150
@@ -234,12 +236,13 @@ export default {
this.preveHeight = res.height
}).exec();
}
this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, {
this.$http.post(`/app/appsessionarchiveinfo/list`, null, {
params: {
current: this.current,
size: 10,
msgType: this.tabList[this.currentTabs].value,
// msgType: 'link',
userId: this.id,
toUserId: this.toUserId,
roomId: this.roomId,
type: this.type,