|
@@ -1,5 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div class="container">
|
|
<div class="container">
|
|
|
|
+ <el-button type="primary" style="margin-top: 20px;" size="mini" @click="readAll">全部已读</el-button>
|
|
<div class="notification-view">
|
|
<div class="notification-view">
|
|
<div class="chat-view">
|
|
<div class="chat-view">
|
|
<el-empty v-if="dataList.length==0" :image-size="200"></el-empty>
|
|
<el-empty v-if="dataList.length==0" :image-size="200"></el-empty>
|
|
@@ -54,7 +55,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { msgList,readMsg } from "@/api/allApi";
|
|
|
|
|
|
+import { msgList,readMsg,readAllMsg} from "@/api/allApi";
|
|
import SiderInfo from '@/components/SiderInfo.vue';
|
|
import SiderInfo from '@/components/SiderInfo.vue';
|
|
import { debounce } from '@/utils/index';
|
|
import { debounce } from '@/utils/index';
|
|
export default{
|
|
export default{
|
|
@@ -75,6 +76,13 @@ export default{
|
|
this.getDataList();
|
|
this.getDataList();
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
|
|
+ readAll(){
|
|
|
|
+ readAllMsg().then(response=>{
|
|
|
|
+ this.page=1;
|
|
|
|
+ this.$store.dispatch('GetUserInfo');
|
|
|
|
+ this.getDataList();
|
|
|
|
+ })
|
|
|
|
+ },
|
|
handleClickMag(val) {
|
|
handleClickMag(val) {
|
|
readMsg({msgId:val.msgId}).then(response=>{
|
|
readMsg({msgId:val.msgId}).then(response=>{
|
|
this.page=1;
|
|
this.page=1;
|
|
@@ -148,7 +156,7 @@ export default{
|
|
max-width: 960px;
|
|
max-width: 960px;
|
|
}
|
|
}
|
|
.notification-view{
|
|
.notification-view{
|
|
- margin-top: 1.767rem;
|
|
|
|
|
|
+ margin-top: 1rem;
|
|
}
|
|
}
|
|
.chat-view{
|
|
.chat-view{
|
|
position: relative;
|
|
position: relative;
|