浏览代码

提交代码

wangxiaogang 3 年之前
父节点
当前提交
63d41c75ad

+ 11 - 2
src/jfw/modules/app/src/web/staticres/jyapp/js/message-index.js

@@ -44,7 +44,11 @@ var vm = new Vue({
             location.href = url
           } else {
             _this.getList()
-            return
+          }
+          try {
+            JyObj.refreshAppointTab('search', 1)
+          } catch (e) {
+            console.log(e)
           }
         }
       })
@@ -87,7 +91,12 @@ var vm = new Vue({
       }
     },
     gotoUrl() {
-      location.href = '/jyapp/frontPage/messageCenter/sess/index'
+      // location.href = '/jyapp/frontPage/messageCenter/sess/index'
+      try {
+        JyObj.skipAppointTab('message')
+      } catch (error) {
+        console.log(error)
+      }
     },
     msgType(val) {
       const obj = {

+ 15 - 1
src/web/staticres/common-module/messageCenter/js/message-template-index.js

@@ -1,4 +1,15 @@
 // 微信端
+function iosBackRefresh () {
+  var isPageHide = false
+  window.addEventListener('pageshow', function () {
+      if (isPageHide) {
+          location.reload()
+      }
+  })
+  window.addEventListener('pagehide', function () {
+      isPageHide = true
+  })
+}
 var temp = '<div class="side-line" v-if="lists.length"><div class="list-msg"><div class="l-msg"><div class="words" v-for="item in lists" :key="item.id"><img class="dot-img" src="../images/no-read-dot.png" v-if="item.isRead == 0"><img class="dot-img" src="../images/read-dot.png" v-else><h3 :class="{isActive: item.isRead == 0}">@@item.msg_type@@</h3><span @click="titleGoto(item)">@@item.title@@</span><p>@@item.createtime@@</p></div></div><img @click="gotoUrl" class="r-msg" src="../images/jyxia.png"></div></div>'
 
 var vm = new Vue({
@@ -13,6 +24,9 @@ var vm = new Vue({
   created() {
     this.getList()
   },
+  mounted() {
+    iosBackRefresh()
+  },
   methods: {
     getList() {
       var _this = this
@@ -41,7 +55,7 @@ var vm = new Vue({
         },
         success:function () {
           if (url) {
-            location.href = url
+            window.open(url)
           } else {
             _this.getList()
           }