Browse Source

Merge branch 'dev/v4.8.17_cyl' of qmx/jy into feature/v4.8.17

zhangyuhan 2 years ago
parent
commit
748a69b1d8
1 changed files with 22 additions and 15 deletions
  1. 22 15
      src/web/staticres/js/message.js

+ 22 - 15
src/web/staticres/js/message.js

@@ -83,21 +83,28 @@ function Message() {
             success: function (r) {
                 if (r && r.status === 1) {
                     // 头部导航消息中心显示/隐藏
-                    $.ajax({
-                        type: 'POST',
-                        url: '/jyapi/message/messageCount',
-                        data: JSON.stringify({userType: 2}),
-                        contentType: 'application/json',
-                        success: function (s) {
-                            if (r.data.count + s.count > 0) {
-                                $('#tips').show()
-                                $('#tips').html(r.data.count + s.count > 99 ? '99+' : r.data.count + s.count)
-                                $('#noNum').html(r.data.count + s.count)
-                            } else {
-                                $('#tips').hide()
-                            }
-                        }
-                    })
+                    // $.ajax({
+                    //     type: 'POST',
+                    //     url: '/jyapi/message/messageCount',
+                    //     data: JSON.stringify({userType: 2}),
+                    //     contentType: 'application/json',
+                    //     success: function (s) {
+                    //         if (r.data.count + s.count > 0) {
+                    //             $('#tips').show()
+                    //             $('#tips').html(r.data.count + s.count > 99 ? '99+' : r.data.count + s.count)
+                    //             $('#noNum').html(r.data.count + s.count)
+                    //         } else {
+                    //             $('#tips').hide()
+                    //         }
+                    //     }
+                    // })
+                    if (r.data && r.data.count) {
+                        $('#tips').show()
+                        $('#tips').html(r.data.count > 99 ? '99+' : r.data.count)
+                        $('#noNum').html(r.data.count)
+                    } else {
+                        $('#tips').hide()
+                    }
                     _this.isOpened = r.data.open
                     _this.openedChange()
                 } else {