From fa8c27912fe6c56a7f857213cd3e83336353d76f Mon Sep 17 00:00:00 2001 From: taoshihan1991 <630892807@qq.com> Date: Wed, 30 Sep 2020 15:46:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=86=E5=8F=B2=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/js/chat-page.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/static/js/chat-page.js b/static/js/chat-page.js index 29ef7ab..f50cb92 100644 --- a/static/js/chat-page.js +++ b/static/js/chat-page.js @@ -151,7 +151,7 @@ new Vue({ type:"get", url:"/messages?visitorId="+this.visitor.visitor_id, success: function(data) { - if(data.code==200 && data.result!=null){ + if(data.code==200 && data.result!=null&&data.result.length!=0){ let msgList=data.result; _this.msgList=[]; for(let i=0;i { + $(".chatBox").append("
—— 以上是历史消息 ——
"); + }); } if(data.code!=200){ _this.$message({ @@ -205,15 +208,6 @@ new Vue({ },getCache : function (key){ return JSON.parse(localStorage.getItem(key)); }, - generateUUID:function () { - var d = new Date().getTime(); - var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) { - var r = (d + Math.random()*16)%16 | 0; - d = Math.floor(d/16); - return (c=='x' ? r : (r&0x3|0x8)).toString(16); - }); - return uuid; - }, //获取自动欢迎语句 getNotice : function (){ let _this=this;