|
@@ -135,7 +135,7 @@
|
|
|
});
|
|
|
}
|
|
|
// 跳转到最后一条数据 与前面的:id进行对照
|
|
|
- that.goBottom();
|
|
|
+ await that.goBottom(that.msgList[that.msgList.length - 1]);
|
|
|
},
|
|
|
// 进行图片的预览
|
|
|
previewImg(e) {
|
|
@@ -185,7 +185,7 @@
|
|
|
})
|
|
|
}
|
|
|
// 跳转到最后一条数据 与前面的:id进行对照
|
|
|
- that.goBottom();
|
|
|
+ await that.goBottom(that.msgList[that.msgList.length - 1]);
|
|
|
} else {
|
|
|
uni.navigateTo({
|
|
|
url: `/pagesHome/login/index`
|
|
@@ -193,16 +193,15 @@
|
|
|
}
|
|
|
},
|
|
|
//输入框高度
|
|
|
- heights(e) {
|
|
|
+ async heights(e) {
|
|
|
const that = this;
|
|
|
- that.goBottom();
|
|
|
+ await that.goBottom(that.msgList[that.msgList.length - 1]);
|
|
|
},
|
|
|
// 滚动到底部
|
|
|
- async goBottom() {
|
|
|
+ async goBottom(item) {
|
|
|
const that = this;
|
|
|
- that.scrollToView = ""
|
|
|
that.$nextTick(function() {
|
|
|
- that.scrollToView = 'msg123456789'
|
|
|
+ that.$set(that, `scrollToView`, `msg${item._id}`)
|
|
|
})
|
|
|
},
|
|
|
// 下拉刷新分页
|