|
@@ -168,9 +168,7 @@
|
|
|
res = await that.$api(`/chatRecord/read`, `POST`, {
|
|
|
ids
|
|
|
}, 'chat')
|
|
|
- if (res.errcode == '0') {
|
|
|
- console.log(res);
|
|
|
- } else {
|
|
|
+ if (res.errcode == '0') {} else {
|
|
|
uni.showToast({
|
|
|
title: res.errmsg,
|
|
|
icon: 'none'
|
|
@@ -179,11 +177,7 @@
|
|
|
}
|
|
|
// 跳转到最后一条数据 与前面的:id进行对照
|
|
|
// 如果是下拉刷新聊天记录不跳到最后一条
|
|
|
- if (that.is_bottom == true) {
|
|
|
- that.$nextTick(function() {
|
|
|
- that.scrollToView = 'msg' + (that.msgList.length - 1)
|
|
|
- })
|
|
|
- }
|
|
|
+ if (that.is_bottom == true) that.goBottom();
|
|
|
},
|
|
|
// 初始化websocket链接
|
|
|
initWebpack() {
|
|
@@ -320,9 +314,7 @@
|
|
|
// })
|
|
|
// }
|
|
|
// 跳转到最后一条数据 与前面的:id进行对照
|
|
|
- that.$nextTick(function() {
|
|
|
- that.scrollToView = 'msg' + (that.msgList.length - 1)
|
|
|
- })
|
|
|
+ that.goBottom();
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '未登录账号无法发送消息 ,请及时登录!',
|