优化分类页面

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-view
:scroll-top="scrollRightTop" :scroll-top="scrollRightTop"
scroll-y scroll-y
scroll-with-animation
class="right-box" class="right-box"
@scroll="rightScroll" @scroll="rightScroll"
:enhanced="true" :enhanced="true"

View File

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