diff --git a/pages.json b/pages.json index 0e125c9..88ca134 100644 --- a/pages.json +++ b/pages.json @@ -662,8 +662,7 @@ "path": "home/index", "style": { "navigationStyle": "custom", - "navigationBarTitleText": "店铺首页", - "enablePullDownRefresh": true + "navigationBarTitleText": "店铺首页" // #ifdef MP , "navigationBarTextStyle": "#FFFFFF" diff --git a/pages/store/home/index.vue b/pages/store/home/index.vue index 355baa8..bf30c12 100644 --- a/pages/store/home/index.vue +++ b/pages/store/home/index.vue @@ -74,7 +74,7 @@ - + @@ -496,6 +496,8 @@ }, data() { return { + //下拉 + isTriggered:false, domain: HTTP_REQUEST_URL, // #ifdef MP menuButtonInfo: uni.getMenuButtonBoundingClientRect(), @@ -1183,7 +1185,18 @@ } }, //#endif + onRefresh(){ + this.isTriggered = true; + const newList = this.goods.reverse(); + this.goods = newList; + this.getProductSpu() + setTimeout(() => { + this.isTriggered = false; + }, 500) + + }, }, + onReachBottom() { // 模拟触底刷新 if (this.tabActive == 0) { @@ -1200,7 +1213,7 @@ this.goods = newList; this.getProductSpu() // uni.startPullDownRefresh(); - uni.stopPullDownRefresh(); + // uni.stopPullDownRefresh(); }, 500) } }