Browse Source

修正消息bug

lipengtao 6 years ago
parent
commit
5bc9f5228d
1 changed files with 8 additions and 1 deletions
  1. 8 1
      js/platTiding.js

+ 8 - 1
js/platTiding.js

@ -4,6 +4,7 @@ $(document).ready(function () {
4 4
  var imgUrl = "";
5 5
  var timerset;
6 6
  var oflag = false;
7
  var pd = false;
7 8
  loginStatus(); //判断个人是否登录
8 9
  $(".list_body").niceScroll({
9 10
    cursorcolor: "#999999"
@ -129,6 +130,7 @@ $(document).ready(function () {
129 130
  document.addEventListener("error", ci, true /*指定事件处理函数在捕获阶段执行*/);
130 131
  /*切换*/
131 132
  $(".list_body").on("click", ".list_item", function () {
133
    pd = true;
132 134
    oflag = true;
133 135
    if(timerset) {
134 136
      clearInterval(timerset);
@ -222,7 +224,9 @@ function getTotalMessage() {
222 224
        if(data.success) {
223 225
          if(data.data) {
224 226
            $('.mesTotal').text('('+data.data+')');  
225
          }                        
227
          } else {
228
            $('.mesTotal').text('');  
229
          }                   
226 230
        }
227 231
    },
228 232
    error: function() {
@ -283,8 +287,11 @@ function getTotalMessage() {
283 287
                '</div>'
284 288
              $(".chat_body_list").append(oStr);
285 289
            }
290
            if (pd) {
286 291
            $(".chat_body.clearfix").getNiceScroll().hide().show().resize();
287 292
            $(".chat_body.clearfix").getNiceScroll(0).doScrollTop($(".chat_body_list").height(), 100);
293
              pd = false;
294
          }
288 295
          }
289 296
        }
290 297
      },