取消分类、服务列表的下拉刷新

This commit is contained in:
TOP糯米 2023-04-01 13:15:40 +08:00
parent 73cf2229fd
commit b015747510
3 changed files with 13 additions and 29 deletions

View File

@ -22,15 +22,13 @@
{ {
"path": "pages/service/cate", "path": "pages/service/cate",
"style": { "style": {
"navigationBarTitleText": "分类", "navigationBarTitleText": "分类"
"enablePullDownRefresh": true
} }
}, },
{ {
"path": "pages/service/list", "path": "pages/service/list",
"style": { "style": {
"navigationBarTitleText": "服务列表", "navigationBarTitleText": "服务列表"
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -80,7 +80,14 @@ export default {
x: x - this.$utils.rpx2px(20), x: x - this.$utils.rpx2px(20),
y: y - this.$utils.rpx2px(40), y: y - this.$utils.rpx2px(40),
}; };
this.initPage(); //
this.data.push({
id: 0,
name: "热门推荐",
cover: "",
child: await this.hotCate(),
});
this.loadCate();
}, },
onShow() { onShow() {
this.newId = this.currentId = this.currentCateId; this.newId = this.currentId = this.currentCateId;
@ -91,22 +98,8 @@ export default {
this.$store.commit("system/currentCateId", this.newId); this.$store.commit("system/currentCateId", this.newId);
}, },
onReachBottom() {}, onReachBottom() {},
onPullDownRefresh() { onPullDownRefresh() {},
this.initPage();
uni.stopPullDownRefresh();
},
methods: { methods: {
async initPage() {
this.data = [];
//
this.data.push({
id: 0,
name: "热门推荐",
cover: "",
child: await this.hotCate(),
});
this.loadCate();
},
/** /**
* 推荐 * 推荐
*/ */

View File

@ -65,20 +65,13 @@ export default {
return; return;
} }
this.currentId = e.id; this.currentId = e.id;
this.initPage(); this.loadList(this.currentId);
}, },
onShow() {}, onShow() {},
onReady() {}, onReady() {},
onReachBottom() {}, onReachBottom() {},
onPullDownRefresh() { onPullDownRefresh() {},
this.initPage();
uni.stopPullDownRefresh();
},
methods: { methods: {
initPage() {
this.data = [];
this.loadList(this.currentId);
},
/** /**
* 加载列表 * 加载列表
*/ */