diff --git a/static/js/chat-page.js b/static/js/chat-page.js index be7aa47..29bae49 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -166,18 +166,6 @@ new Vue({ } let _this=this; var extra=getQuery("extra"); - if(extra!=""){ - var extraJson=JSON.parse(window.atob(extra)) - for(var key in extraJson){ - if(extraJson[key]==""){ - _this.$message({ - message: "用户扩展信息错误", - type: 'error' - }); - return; - } - } - } //发送消息 $.post("/visitor_login",{visitor_id:visitor_id,refer:REFER,to_id:KEFU_ID,extra:extra},function(res){ if(res.code!=200){ @@ -228,7 +216,9 @@ new Vue({ content.content = replaceContent(visitorMes["content"]); content.time = visitorMes["time"]; _this.msgList.push(content); - _this.scrollBottom(); + if(_this.msgList.length>=4){ + _this.scrollBottom(); + } } _this.$nextTick(function(){ $(".chatBox").append("
"+GOFLY_LANG[LANG]['historymes']+"
");