优化分类页面

This commit is contained in:
TOP糯米 2023-03-09 14:15:06 +08:00
parent 5f3b005b0a
commit febbcb457b
2 changed files with 4 additions and 6 deletions

View File

@ -15,7 +15,6 @@
<scroll-view
:scroll-top="scrollRightTop"
scroll-y
scroll-with-animation
class="right-box"
@scroll="rightScroll"
:enhanced="true"

View File

@ -81,11 +81,12 @@ export default {
this.loadCate();
},
onShow() {
this.currentId = this.indexCateId;
this.newId = this.currentId = this.indexCateId;
},
onReady() {},
onHide() {
this.currentId = this.newId;
this.currentId = 0;
this.$store.commit("system/indexCateId", this.newId);
},
onReachBottom() {},
onPullDownRefresh() {},
@ -137,12 +138,10 @@ export default {
.catch((e) => {});
},
onScroll(id) {
// #ifdef MP-WEIXIN
this.newId = id;
this.$store.commit("system/indexCateId", id);
// #endif
},
clickItem(parentId, id) {
this.newId = parentId;
this.$utils.toPage("/pages/service/list?id=" + id);
},
},