Browse Source

上传

master
前端-胡立永 7 months ago
parent
commit
0c879dcc0f
2 changed files with 42 additions and 11 deletions
  1. +32
    -1
      pages/index/center.vue
  2. +10
    -10
      pages/index/index.vue

+ 32
- 1
pages/index/center.vue View File

@ -146,10 +146,32 @@
}, },
data() { data() {
return { return {
userList : [],
queryParams: {
pageNo: 1,
pageSize: 10,
title: '',
},
total : 0,
} }
}, },
onShow() { onShow() {
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
//
if(this.userShop){
this.getUserPage()
}
},
//
onReachBottom() {
if(this.queryParams.pageSize < this.productList.total){
this.queryParams.pageSize += 10
//
if(this.userShop){
this.getUserPage()
}
}
}, },
methods: { methods: {
headBtn() { headBtn() {
@ -163,7 +185,16 @@
} }
}) })
}, },
//
getUserPage(){
this.$api('getMyUserPage', this.queryParams, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.userList = res.result
console.log("===getUserPage==");
}
})
},
} }
} }
</script> </script>


+ 10
- 10
pages/index/index.vue View File

@ -152,9 +152,9 @@
this.noticeList() this.noticeList()
this.banner() this.banner()
if(!this.userShop.shop){
//
this.getUserPage()
if(this.userShop){
//
this.getLaundryStoreHomeData()
}else{ }else{
// //
this.getGoodsPage() this.getGoodsPage()
@ -162,8 +162,8 @@
}, },
// //
onPullDownRefresh(){ onPullDownRefresh(){
if(!this.userShop.shop){
this.getUserPage()
if(this.userShop){
this.getLaundryStoreHomeData()
}else{ }else{
this.getGoodsPage() this.getGoodsPage()
} }
@ -174,8 +174,8 @@
onReachBottom() { onReachBottom() {
if(this.queryParams.pageSize < this.productList.total){ if(this.queryParams.pageSize < this.productList.total){
this.queryParams.pageSize += 10 this.queryParams.pageSize += 10
if(!this.userShop.shop){
this.getUserPage()
if(this.userShop){
this.getLaundryStoreHomeData()
}else{ }else{
this.getGoodsPage() this.getGoodsPage()
} }
@ -210,9 +210,9 @@
} }
}) })
}, },
//
getUserPage(){
this.$api('getMyUserPage', this.queryParams, res => {
//
getLaundryStoreHomeData(){
this.$api('laundryStoreHomeData', this.queryParams, res => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
if(res.code == 200){ if(res.code == 200){
this.userList = res.result this.userList = res.result


Loading…
Cancel
Save