调整接口

This commit is contained in:
aixianling
2022-08-09 09:51:42 +08:00
parent d26f9793a7
commit 0d1999e553

View File

@@ -44,23 +44,14 @@ export default {
},
created() {
this.getInfo()
uni.$on("reachBottom2", () => {
this.current++;
this.getInfo()
})
uni.$on('updateIntegral', () => {
this.current = 1
this.list = []
this.getInfo()
})
},
methods: {
// 积分排行
getInfo() {
let {current, user: {id: userId}, info: {details}} = this
let {current, info: {details}} = this
if (!details?.pages || current <= details.pages) {
this.$http.post('/app/appvillagerintegraldetail/sysUserIntegralList', null, {
params: {userId, current, size: 10}
this.$http.post('/app/appintegraluser/appGirdIntegral', null, {
params: {current, size: 10}
}).then(res => {
if (res?.data) {
this.info = res.data
@@ -69,13 +60,10 @@ export default {
})
}
},
gotoGive() {
uni.navigateTo({url: "./giveIntegral"})
}
},
destroyed() {
uni.$off("reachBottom2")
uni.$off("onShow")
onReachBottom() {
this.current++
this.getInfo()
}
}
</script>