From 7001de2b8cd0b94d22815b4df65cbeb47e1ee216 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Wed, 07 Jul 2021 17:17:30 +0800
Subject: [PATCH] 问题修复
---
pages/groupChat/chating.vue | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/pages/groupChat/chating.vue b/pages/groupChat/chating.vue
index b585237..df1f507 100644
--- a/pages/groupChat/chating.vue
+++ b/pages/groupChat/chating.vue
@@ -206,7 +206,6 @@
},
// 获取聊天数据
_getMsg(page) {
-
var that = this;
that.senId = WxStorage.get("ids");
uni.request({
@@ -266,7 +265,10 @@
that.$nextTick(() => {
that.isanimation = false
- that.scrollToView = 'msg' + that.getData[0].id
+ if(that.getData.length != 0){
+ that.scrollToView = 'msg' + that.getData[0].id
+ }
+
})
// 数据加载完毕关闭动画,停止数据加载
clearInterval(this.loading)
@@ -365,7 +367,10 @@
this.scrollToView = ''
this.$nextTick(() => {
let len = this.getData.length -1
- this.scrollToView = 'msg' + this.getData[0].id
+ if(this.getData.length != 0){
+ this.scrollToView = 'msg' + this.getData[0].id
+ }
+
})
},
// 地图定位
--
Gitblit v1.9.3