Merge remote-tracking branch 'origin/master'
# Conflicts: # pages.json
This commit is contained in:
@@ -569,16 +569,21 @@
|
||||
userId.value = uni.getStorageSync("user").id
|
||||
// 获取标题
|
||||
groupAPI.getById(groupId.value).then(res => {
|
||||
chatTitle.value = res.data.program.linkman.username + "(" + res.data.program.name + ")"
|
||||
// chatTitle.value = res.data.program.linkman.username + "(" + res.data.program.name + ")"
|
||||
chatTitle.value = res.data.program.name
|
||||
})
|
||||
|
||||
loadHistoryData() // 最近10条
|
||||
setTimeout(()=>{
|
||||
scrollToBottom()
|
||||
}, 1000)
|
||||
|
||||
// 未读变已读
|
||||
let data = { groupId: groupId.value, userId: userId.value }
|
||||
messageAPI.unread(data).then(res => {
|
||||
if (res.code == 200) {
|
||||
dataList.value = dataList.value.concat(res.data)
|
||||
}
|
||||
})
|
||||
// let data = { groupId: groupId.value, userId: userId.value }
|
||||
// messageAPI.unread(data).then(res => {
|
||||
// if (res.code == 200) {
|
||||
// dataList.value = dataList.value.concat(res.data)
|
||||
// }
|
||||
// })
|
||||
messageAPI.read({ groupId: groupId.value, userId: userId.value })
|
||||
}
|
||||
|
||||
@@ -590,10 +595,10 @@
|
||||
const loadFix = ref(true)
|
||||
|
||||
// 历史记录
|
||||
const loadHistoryData = () => {
|
||||
const loadHistoryData = async () => {
|
||||
params.value.groupId = groupId.value
|
||||
messageAPI.list(params.value).then(res => {
|
||||
console.log(res);
|
||||
await messageAPI.list(params.value).then(res => {
|
||||
// console.log(res);
|
||||
if (res.data.list.length != 0) {
|
||||
res.data.list.forEach(item => {
|
||||
dataList.value.unshift(item)
|
||||
@@ -799,6 +804,7 @@
|
||||
.img-content {
|
||||
margin-left: 10rpx;
|
||||
height: 200rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user