From 5402144f6522101e4e964331de2dda35366dcf2d Mon Sep 17 00:00:00 2001
From: taoshihan1991 <630892807@qq.com>
Date: Tue, 2 Mar 2021 19:05:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=E7=AB=AF=E5=B0=91=E5=8A=A0?=
=?UTF-8?q?=E8=BD=BD=E7=82=B9=E8=AE=B0=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
static/html/chat_page.html | 10 ++++++++++
static/js/chat-lang.js | 2 ++
static/js/chat-page.js | 9 +++++++--
3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/static/html/chat_page.html b/static/html/chat_page.html
index fc2f7ac..6bac207 100644
--- a/static/html/chat_page.html
+++ b/static/html/chat_page.html
@@ -27,6 +27,16 @@
:closable="false"
type="success">
+
+
<{v.time}>
diff --git a/static/js/chat-lang.js b/static/js/chat-lang.js
index 7e24254..a17d075 100644
--- a/static/js/chat-lang.js
+++ b/static/js/chat-lang.js
@@ -5,6 +5,7 @@ var GOFLY_LANG={
"connectok":"连接成功!",
"chating":"正在与您沟通!",
"historymes":"—— 以上是历史消息 ——",
+ "moremessage":"点击more加载更多记录",
"copyright":"GO-FLY1.0.0客服陶士涵提供技术支持",
"textarea":"请输入内容",
},
@@ -14,6 +15,7 @@ var GOFLY_LANG={
"connectok":"connection succeeded!",
"chating":"chating with you!",
"historymes":"—— Today ——",
+ "moremessage":"click buuton show more messages",
"copyright":"We run on GOFLY",
"textarea":"Enter your message",
},
diff --git a/static/js/chat-page.js b/static/js/chat-page.js
index 84c6a80..5f444fd 100644
--- a/static/js/chat-page.js
+++ b/static/js/chat-page.js
@@ -199,7 +199,7 @@ new Vue({
// }
},
//获取信息列表
- getMesssagesByVisitorId:function(){
+ getMesssagesByVisitorId:function(isAll){
let _this=this;
$.ajax({
type:"get",
@@ -208,7 +208,12 @@ new Vue({
if(data.code==200 && data.result!=null&&data.result.length!=0){
let msgList=data.result;
_this.msgList=[];
- for(let i=0;i10){
+ var i=msgList.length-10
+ }else{
+ var i=0;
+ }
+ for(;i