소스 검색

提交代码

wangxiaogang 3 년 전
부모
커밋
ef687b0df9
2개의 변경된 파일7개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 0
      src/web/staticres/common-module/messageCenter/js/index.js
  2. 6 8
      src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

+ 1 - 0
src/web/staticres/common-module/messageCenter/js/index.js

@@ -17,6 +17,7 @@ var vm = new Vue({
     }
   },
   created() {
+    Object.assign(this.$data, this.$options.data())
     this.lastMsg()
     this.msgData()
     let wxType = getType()

+ 6 - 8
src/web/staticres/frontRouter/pc/mesgCenter/js/index-pc.js

@@ -72,7 +72,7 @@ var vm = new Vue({
       this.tabsList.lists = []
       this.tabsData(this.isTabs)
     },
-    readed(ids, type) {
+    readed(ids, type, url) {
       const _this = this
       $.ajax({
         type:'GET',
@@ -85,25 +85,23 @@ var vm = new Vue({
           _this.tabsData(_this.isTabs)
           _this.tabsCount()
           message.checkOpened()
+          if (url) {
+            location.href = url
+          }
         }
       })
     },
     linked(id, url, str, num, type) {
       if (num == 1) {
         if (url) {
-          this.readed(id, type)
+          this.readed(id, type, url)
         }
       }
       if (num == 2) {
         if (!str) {
-          this.readed(id, type)
+          this.readed(id, type, url)
         }
       }
-      setTimeout(() => {
-        if (url) {
-          location.href = url
-        }
-      }, 300)
     }
   }
 })