下拉查看
This commit is contained in:
@@ -63,6 +63,7 @@
|
||||
import {mapState, mapActions} from "vuex";
|
||||
export default {
|
||||
name: "conversationDetail",
|
||||
enablePullDownRefresh: true,
|
||||
data() {
|
||||
return {
|
||||
tabList: [
|
||||
@@ -111,6 +112,18 @@ export default {
|
||||
onShow() {
|
||||
document.title = '会话详情'
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
if(this.current > this.pages) {
|
||||
uni.stopPullDownRefresh()
|
||||
return this.$u.toast('已加载完成,没有更多数据')
|
||||
}else {
|
||||
this.current ++
|
||||
this.getList()
|
||||
setTimeout(() => {
|
||||
uni.stopPullDownRefresh()
|
||||
}, 1000)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toGroup() {
|
||||
if(this.type == 1) {
|
||||
@@ -140,7 +153,6 @@ export default {
|
||||
this.getList()
|
||||
},
|
||||
getList() {
|
||||
if(this.current > this.pages) return
|
||||
this.$http.post(`/app/appsessionarchiveinfo/listByUser`, null, {
|
||||
params: {
|
||||
current: this.current,
|
||||
@@ -166,7 +178,7 @@ export default {
|
||||
// item.amr = amr; //将初始化好的amr赋值到当前消息对象data中
|
||||
// }
|
||||
// })
|
||||
this.list = this.current > 1 ? [...this.list, ...res.data.records]: res.data.records
|
||||
this.list = this.current > 1 ? [ ...res.data.records, ...this.list]: res.data.records
|
||||
this.pages = res.data.pages
|
||||
}
|
||||
})
|
||||
@@ -186,8 +198,8 @@ export default {
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current ++
|
||||
this.getList()
|
||||
// this.current ++
|
||||
// this.getList()
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user