会话存档

This commit is contained in:
liuye
2023-06-13 16:35:25 +08:00
parent 57b76d549b
commit 7d349d9f51

View File

@@ -188,7 +188,6 @@ export default {
// }, // },
methods: { methods: {
scroll(e) { scroll(e) {
console.log(e)
if(e.detail.scrollTop == 0) { if(e.detail.scrollTop == 0) {
if(this.current > this.pages) { if(this.current > this.pages) {
return this.$u.toast('已加载完成,没有更多数据') return this.$u.toast('已加载完成,没有更多数据')
@@ -211,7 +210,6 @@ export default {
this.getListInit() this.getListInit()
}, },
onDateChange (e) { onDateChange (e) {
console.log(e)
this.dateList = [e.startDate, e.endDate] this.dateList = [e.startDate, e.endDate]
this.getListInit() this.getListInit()
}, },
@@ -228,7 +226,6 @@ export default {
getList() { getList() {
if(this.current > 1) { if(this.current > 1) {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => { uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
console.log('old', res.height, uni.getSystemInfoSync().windowHeight)
this.preveHeight = res.height this.preveHeight = res.height
}).exec(); }).exec();
} }
@@ -266,13 +263,11 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => { uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
console.log(this.scrollTop, res.height)
if(this.current == 1) { if(this.current == 1) {
this.scrollTop = res.height - this.scrollHeight this.scrollTop = res.height - this.scrollHeight
}else { }else {
this.scrollTop = res.height - this.preveHeight this.scrollTop = res.height - this.preveHeight
} }
console.log(this.current, this.scrollTop, res.height)
}).exec(); }).exec();
}) })
} }