Merge remote-tracking branch 'origin/master'

# Conflicts:
#	pages.json
This commit is contained in:
2025-10-17 14:17:25 +08:00
60 changed files with 1574 additions and 187 deletions

View File

@@ -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;
}
}