Browse Source

优化待处理消息

master
陈裕财 4 years ago
parent
commit
7d24e724c8
  1. 12
      src/components/NoticeMsgBar/index.vue

12
src/components/NoticeMsgBar/index.vue

@ -24,6 +24,10 @@
</template> </template>
<script> <script>
import {
editSomeFieldsNotifyMsg
} from '@/api/mdp/sys/notifyMsg'
import { import {
getNoticeMsg,goToPage getNoticeMsg,goToPage
} from '@/api/cpd' } from '@/api/cpd'
@ -41,8 +45,11 @@ export default {
} }
}, },
watch:{ watch:{
unreadMsgCount(count){
unreadMsgCount(count,old){
var that = this; var that = this;
if(old>count){
return;
}
if(count>1){ if(count>1){
this.$notify.warning({title:'未读消息',message:'有'+count+'条未读消息待处理',showClose:true,position:'bottom-right', this.$notify.warning({title:'未读消息',message:'有'+count+'条未读消息待处理',showClose:true,position:'bottom-right',
onClick:function(){ onClick:function(){
@ -104,7 +111,8 @@ export default {
}, },
mounted(){ mounted(){
this.doGetNoticeMsgNoTips() this.doGetNoticeMsgNoTips()
setInterval(this.doGetNoticeMsgNoRead, 60000 * 5);
//setInterval(this.doGetNoticeMsgNoRead, 60000 * 5);
setInterval(this.doGetNoticeMsgNoRead, 5000);
} }
} }
</script> </script>

Loading…
Cancel
Save