dusenyao hace 3 años
padre
commit
a2877f760e
Se han modificado 1 ficheros con 13 adiciones y 9 borrados
  1. 13 9
      src/layouts/components/LayoutHeader.vue

+ 13 - 9
src/layouts/components/LayoutHeader.vue

@@ -84,18 +84,14 @@ export default {
   },
   created() {
     this.getChildSysList();
+    this.isExistMyMessage_NotRead();
+
     const { token, isHas } = getToken();
     if (isHas) {
       this.userMessage = token;
 
-      const interval = setInterval(() => {
-        IsExistMyMessage_NotRead()
-          .then(({ is_exist }) => {
-            this.isNotRead = JSON.parse(is_exist);
-          })
-          .catch(() => {
-            clearInterval(interval);
-          });
+      setInterval(() => {
+        this.isExistMyMessage_NotRead();
       }, 120000);
 
       this.getLangList();
@@ -107,7 +103,6 @@ export default {
       link.type = 'image/x-icon';
       link.rel = 'shortcut icon';
       link.href = config.title_icon_url;
-      console.log(config.title_icon_url);
       document.getElementsByTagName('head')[0].appendChild(link);
     }
   },
@@ -160,6 +155,14 @@ export default {
       this.lang = language_name;
       await loadLanguageAsync(language_type);
     },
+
+    isExistMyMessage_NotRead() {
+      IsExistMyMessage_NotRead().then(({ is_exist }) => {
+        console.log(is_exist);
+        this.isNotRead = JSON.parse(is_exist);
+      });
+    },
+
     getChildSysList() {
       GetChildSysList_CanEnter_PC()
         .then(({ child_sys_list }) => {
@@ -270,6 +273,7 @@ export default {
       img {
         width: 18px;
         height: 24px;
+        cursor: pointer;
       }
 
       .redDot {