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() {
return {
userList : [],
queryParams: {
pageNo: 1,
pageSize: 10,
title: '',
},
total : 0,
}
},
onShow() {
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: {
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>


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

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


Loading…
Cancel
Save