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