优化消息已读

This commit is contained in:
2023-10-26 14:49:45 +08:00
parent 3a2a4c2814
commit fd3913814e
2 changed files with 9 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "vue-admin",
"private": true,
"version": "1.3.1",
"version": "1.3.2",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -33,13 +33,16 @@
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="scope">
<el-button type="success" size="small" icon="ChatDotSquare"
v-if="scope.row.typefirst != 1 || scope.row.typesecond != 1" :disabled="scope.row.isdeal == 1"
@click="readerHandle(scope.row)">已读</el-button>
<el-link :href="scope.row.url" target="_blank" :underline="false" v-if="scope.row.url">
<el-button type="primary" size="small" icon="Link"
<el-button type="warning" size="small" icon="Link"
@click="readerHandle(scope.row)">跳转</el-button>
</el-link>
<RouterLink :to="{ name: 'shop_detail', query: { id: scope.row.userid, type: 'msg1' } }"
v-if="scope.row.typefirst == 1 && scope.row.typesecond == 1">
<el-button type="primary" size="small" icon="Link"
<el-button type="primary" size="small" icon="Edit"
@click="readerHandle(scope.row)">处理</el-button>
</RouterLink>
</template>
@@ -94,10 +97,11 @@ async function getNoticesAjax() {
// 已读消息
function readerHandle(item) {
console.log(item)
if (!item.isdeal) {
unread({ noticecode: item.noticecode })
paginationChange()
}
paginationChange()
}
onMounted(() => {
@@ -107,6 +111,6 @@ onMounted(() => {
<style scoped lang="scss">
.table {
height: calc(100vh - 263px);
height: calc(100vh - 218px);
}
</style>