访客端滚动问题

pull/23/head 0.3.3
630892807@qq.com 4 years ago
parent add05e11a3
commit 62bdd757c4

@ -166,18 +166,6 @@ new Vue({
} }
let _this=this; let _this=this;
var extra=getQuery("extra"); 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){ $.post("/visitor_login",{visitor_id:visitor_id,refer:REFER,to_id:KEFU_ID,extra:extra},function(res){
if(res.code!=200){ if(res.code!=200){
@ -228,7 +216,9 @@ new Vue({
content.content = replaceContent(visitorMes["content"]); content.content = replaceContent(visitorMes["content"]);
content.time = visitorMes["time"]; content.time = visitorMes["time"];
_this.msgList.push(content); _this.msgList.push(content);
_this.scrollBottom(); if(_this.msgList.length>=4){
_this.scrollBottom();
}
} }
_this.$nextTick(function(){ _this.$nextTick(function(){
$(".chatBox").append("<div class=\"chatTime\">"+GOFLY_LANG[LANG]['historymes']+"</div>"); $(".chatBox").append("<div class=\"chatTime\">"+GOFLY_LANG[LANG]['historymes']+"</div>");

Loading…
Cancel
Save