Commit 9e4497a4 authored by zhangjianqian's avatar zhangjianqian

消息通知

parent fc73a1cf
...@@ -7,12 +7,12 @@ ...@@ -7,12 +7,12 @@
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<div class="right-menu-item" v-if="total>0" @click="$router.push('/emergency/emergency')"> <!--<div class="right-menu-item" v-if="total>0" @click="$router.push('/emergency/emergency')">-->
<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;"> <!--<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;">-->
</div> <!--</div>-->
<!-- <search id="header-search" class="right-menu-item" /> --> <!-- <search id="header-search" class="right-menu-item" /> -->
          <el-badge :value="20" :max="99" class="item">           <el-badge :value="total" :max="99" class="item" >
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;"></i>             <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" @click="$router.push('/emergency/emergency')"></i>
          </el-badge>           </el-badge>
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
data() { data() {
return { return {
userType:-2, userType:-2,
total:0, total:null,
xiaohidden:false, xiaohidden:false,
} }
}, },
...@@ -113,17 +113,14 @@ mounted(){ ...@@ -113,17 +113,14 @@ mounted(){
} }
listReceive(params).then(response => { listReceive(params).then(response => {
//console.log("total==",response.total); //console.log("total==",response.total);
this.total= response.total; if(response.total!=0){
this.total= response.total;
}else{
this.total= "";
}
}); });
}, 5000); }, 5000);
setInterval(() => {
if(this.xiaohidden){
this.xiaohidden = false
}else{
this.xiaohidden = true
}
},500);
}, },
methods: { methods: {
toggleSideBar() { toggleSideBar() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment