Browse Source

Merge branch 'release' into dev4.7.0

luwenna 3 years ago
parent
commit
3cb1315d94

+ 30 - 28
src/jfw/modules/app/src/web/staticres/jyapp/js/message-index.js

@@ -40,18 +40,18 @@ var vm = new Vue({
           msgType: type
         },
         success:function () {
-          try {
+          // try {
             // JyObj.refreshAppointTab('search', 0)
-            JyObj.refreshAppointTab('message', 1)
-            JyObj.checkLab()
-          } catch (e) {
-            console.log(e)
-          }
-          if (url) {
-            location.href = url
-          } else {
-            _this.getList()
-          }
+            // JyObj.refreshAppointTab('message', 1)
+          //   JyObj.checkLab()
+          // } catch (e) {
+          //   console.log(e)
+          // }
+          // if (url) {
+            window.location.href = '/jyapp/frontPage/messageCenter/sess/detail?type=' + _this.msgType1(type) + '&num=1'
+          // } else {
+          //   _this.getList()
+          // }
         }
       })
     },
@@ -69,27 +69,17 @@ var vm = new Vue({
           }
         }
       } else {
-        if (appType == 'android') {
+        // if (appType == 'android') {
           if (item.isRead == 0) {
             this.topRead(item.id, urls.androidUrl, item.msg_type)
           } else {
-            if (urls.androidUrl) {
-              location.href = urls.androidUrl
-            } else {
-              return
-            }
-          }
-        } else {
-          if (item.isRead == 0) {
-            this.topRead(item.id, urls.iosUrl, item.msg_type)
-          } else {
-            if (urls.iosUrl) {
-              location.href = urls.iosUrl
-            } else {
-              return
-            }
+            // if (urls.androidUrl) {
+              window.location.href = '/jyapp/frontPage/messageCenter/sess/detail?type=' + this.msgType1(item.msg_type) + '&num=1'
+            // } else {
+            //   return
+            // }
           }
-        }
+        // }
       }
     },
     gotoUrl() {
@@ -111,6 +101,18 @@ var vm = new Vue({
         '7': '系统通知',
       }
       return obj[val]
+    },
+    msgType1(val) {
+      const obj = {
+        '活动优惠': '1',
+        '服务通知': '2',
+        '订阅消息': '3',
+        '项目动态': '4',
+        '企业动态': '5',
+        '分析报告': '6',
+        '系统通知': '7',
+      }
+      return obj[val]
     }
   }
 })

+ 5 - 5
src/web/staticres/common-module/messageCenter/js/detail.js

@@ -61,11 +61,11 @@ var vm = new Vue({
           msgType: val
         },
         success:function () {
-          try {
-            JyObj.refreshAppointTab('search', 1)
-          } catch (error) {
-            console.log(error) 
-          }
+          // try {
+          //   JyObj.refreshAppointTab('search', 1)
+          // } catch (error) {
+          //   console.log(error) 
+          // }
         }
       })
     },

+ 23 - 12
src/web/staticres/common-module/messageCenter/js/message-template-index.js

@@ -25,7 +25,7 @@ var vm = new Vue({
     this.getList()
   },
   mounted() {
-    iosBackRefresh()
+    // iosBackRefresh()
   },
   methods: {
     getList() {
@@ -54,14 +54,14 @@ var vm = new Vue({
           msgType: type
         },
         success:function () {
-          if (url) {
+          // if (url) {
             // window.open(url)
             const a1 = document.createElement('a')
-            a1.href = url
+            a1.href = '/weixin/frontPage/messageCenter/sess/detail?type=' + _this.msgType1(type) + '&num=1'
             a1.click()
-          } else {
-            _this.getList()
-          }
+          // } else {
+          //   _this.getList()
+          // }
         }
       })
     },
@@ -73,12 +73,12 @@ var vm = new Vue({
         if (item.isRead == 0) {
           this.topRead(item.id, urls.weChatUrl, item.msg_type)
         } else {
-          if (urls.weChatUrl) {
+          // if (urls.weChatUrl) {
             //链接中如果是www.jianyu360.cn域名,微信中会唤起app,该用window.open
-            window.open(urls.weChatUrl)
-          } else {
-            return
-          }
+            window.open('/weixin/frontPage/messageCenter/sess/detail?type=' + this.msgType1(item.msg_type) + '&num=1')
+          // } else {
+          //   return
+          // }
         }
       } else {
         if (appType == 'android') {
@@ -105,7 +105,6 @@ var vm = new Vue({
       }
     },
     gotoUrl() {
-      // location.href = '/weixin/frontPage/messageCenter/sess/index?msg=2'
       window.open('/weixin/frontPage/messageCenter/sess/index?msg=2')
     },
     msgType(val) {
@@ -119,6 +118,18 @@ var vm = new Vue({
         '7': '系统通知',
       }
       return obj[val]
+    },
+    msgType1(val) {
+      const obj = {
+        '活动优惠': '1',
+        '服务通知': '2',
+        '订阅消息': '3',
+        '项目动态': '4',
+        '企业动态': '5',
+        '分析报告': '6',
+        '系统通知': '7',
+      }
+      return obj[val]
     }
   }
 })

+ 8 - 8
src/web/staticres/js/pc-message-index.js

@@ -54,11 +54,11 @@ var vmMesg = new Vue({
           msgType: type
         },
         success:function () {
-          if (url) {
-            location.href = url
-          } else {
-            _this.getList()
-          }
+          // if (url) {
+            location.href = '/swordfish/frontPage/messageCenter/sess/index'
+          // } else {
+            // _this.getList()
+          // }
         }
       })
     },
@@ -66,9 +66,9 @@ var vmMesg = new Vue({
       if (item.isRead == 0) {
         this.readed(item.id, item.msg_type, item.link)
       } else {
-        if (item.link) {
-          location.href = item.link
-        }
+        // if (item.link) {
+          location.href = '/swordfish/frontPage/messageCenter/sess/index'
+        // }
       }
     },
     checkCounts() {