{{item.content}}
+
+
+
{{item.content}}
-
-
-
-
-
-
-
-
-
-
-
- {{ item.fileSizeStr }}
-
-
-
- {{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息
-
- 对方不同意会话存档内容,你将无法继续提供服务
-
- 对方同意会话存档内容,你可以继续提供服务
-
-
-
-
-
@@ -122,7 +124,6 @@
import {mapState, mapActions} from "vuex";
export default {
name: "conversationDetail",
- enablePullDownRefresh: true,
data() {
return {
tabList: [
@@ -151,9 +152,9 @@ export default {
type: '',
isShowDate: false,
dateList: [],
-
- amrPlay: '',
- amrPlayStatus: false,
+ scrollTop: 0,
+ scrollHeight: '',
+ preveHeight: ''
};
},
computed: {
@@ -167,23 +168,36 @@ export default {
}
this.type = option.type
this.getList()
+ console.log()
+ this.scrollHeight = uni.getSystemInfoSync().windowHeight - 150
},
onShow() {
document.title = '会话详情'
},
- onPullDownRefresh() {
- if(this.current > this.pages) {
- uni.stopPullDownRefresh()
- return this.$u.toast('已加载完成,没有更多数据')
- }else {
- this.current ++
- this.getList()
- setTimeout(() => {
- uni.stopPullDownRefresh()
- }, 1000)
- }
- },
+ // onPullDownRefresh() {
+ // if(this.current > this.pages) {
+ // uni.stopPullDownRefresh()
+ // return this.$u.toast('已加载完成,没有更多数据')
+ // }else {
+ // this.current ++
+ // this.getList()
+ // setTimeout(() => {
+ // uni.stopPullDownRefresh()
+ // }, 1000)
+ // }
+ // },
methods: {
+ scroll(e) {
+ console.log(e)
+ if(e.detail.scrollTop == 0) {
+ if(this.current > this.pages) {
+ return this.$u.toast('已加载完成,没有更多数据')
+ }else {
+ this.current ++
+ this.getList()
+ }
+ }
+ },
toGroup() {
if(this.type == 1) {
uni.navigateTo({url: `./groupDetail`})
@@ -212,6 +226,12 @@ export default {
this.getList()
},
getList() {
+ if(this.current > 1) {
+ uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
+ console.log('old', res.height, uni.getSystemInfoSync().windowHeight)
+ this.preveHeight = res.height
+ }).exec();
+ }
this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, {
params: {
current: this.current,
@@ -243,6 +263,18 @@ export default {
})
this.list = this.current > 1 ? [ ...res.data.records, ...this.list]: res.data.records
this.pages = res.data.pages
+
+ this.$nextTick(() => {
+ uni.createSelectorQuery().select(".conversation-list").boundingClientRect((res) => {
+ console.log(this.scrollTop, res.height)
+ if(this.current == 1) {
+ this.scrollTop = res.height - this.scrollHeight
+ }else {
+ this.scrollTop = res.height - this.preveHeight
+ }
+ console.log(this.current, this.scrollTop, res.height)
+ }).exec();
+ })
}
})
},
-
-
-
- {{item.cardCorpName}}
-{{item.cardUserName}}
- -
-
-
-
+
-
+
- 个人名片
-
-
-
+
-
- {{item.title}}
-{{item.address}}
+ + + + +
+
+
+ {{ item.fileSizeStr }}
+
-
-
-
-
-
-
-
+
+
- {{item.description}}
+{{item.userName}}{{item.msgSendTime.substring(0, 16)}}撤回了一条消息
+
+ 对方不同意会话存档内容,你将无法继续提供服务
+
+ 对方同意会话存档内容,你可以继续提供服务
+
+
+
+
+
+
+
+
+ {{item.cardCorpName}}
+{{item.cardUserName}}
+ +
+
+
+
+
+ 个人名片
+
+
+
- {{item.title}}
-{{item.username}}{{item.displayname}}
+ {{item.address}}
小程序
-
-
+
+
-
-
+
-
- {{item.title}}
-{{item.username}}
-
-
+
+
+
-
+
+
+
{{item.description}}
+{{item.title}}
+{{item.username}}{{item.displayname}}
+ 小程序
分享链接
-
+
+
+
+
+
+
+ {{item.title}}
+{{item.username}}
+
+
+
+ 分享链接
+