优化查询sql 小程序未读消息数量通过websocket获取

This commit is contained in:
wxl
2025-01-12 23:55:59 +08:00
parent 5bb4ecc25a
commit 413cc421a8
4 changed files with 63 additions and 14 deletions

View File

@@ -83,6 +83,17 @@
</template>
</el-table-column>
<el-table-column
label="操作时间"
width="160"
align="center"
>
<template slot-scope="scope">
{{ scope.row.createTime }}
</template>
</el-table-column>
<el-table-column
label="请求模块"
width="160"
@@ -165,15 +176,6 @@
</template>
</el-table-column>
<el-table-column
label="操作时间"
width="160"
align="center"
>
<template slot-scope="scope">
{{ scope.row.createTime }}
</template>
</el-table-column>

View File

@@ -82,7 +82,6 @@
});
this.contact = contact
contact.page = 1
contact.chatList = []
//读取当前用户信息
this.readAuthorMessage(contact.id)
//获取总未读消息
@@ -140,8 +139,6 @@
//倒序查询但是正序排列 时间早的在前面
this.contact.totalPage = res.data.pages
const messages = res.data.records
this.contact.chatList.push(... res.data.records.reverse());
//当前页数小于等于总页数
if(this.contact.page<=res.data.pages){
//等于1时执行页面滚动操作