From 8de4d48c65ebf37f2d23afe3fc52d4cb1b1d66bb Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Sat, 7 May 2022 23:25:29 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=A8=E5=BA=97=E8=AF=A6=E6=83=85=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E4=BA=8C=E7=BA=A7=E5=88=86=E7=B1=BB=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/plugins/realstore/detail/detail.css | 8 ++++++++ pages/plugins/realstore/detail/detail.vue | 25 +++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/pages/plugins/realstore/detail/detail.css b/pages/plugins/realstore/detail/detail.css index b0a63cca..5437729b 100644 --- a/pages/plugins/realstore/detail/detail.css +++ b/pages/plugins/realstore/detail/detail.css @@ -152,6 +152,14 @@ .right-content { width: calc(100% - 220rpx); } +.right-content-actual .word-list { + position: sticky; + top: 0; + right: 0; + background: #f5f5f5; + z-index: 1; + padding: 0 1px 20rpx 1px; +} .goods-list .goods-img { width: 160rpx; height: 160rpx !important; diff --git a/pages/plugins/realstore/detail/detail.vue b/pages/plugins/realstore/detail/detail.vue index 9c76bc67..5f9d134e 100644 --- a/pages/plugins/realstore/detail/detail.vue +++ b/pages/plugins/realstore/detail/detail.vue @@ -79,10 +79,10 @@ - 全部 + 全部 - + {{item.name}} @@ -94,7 +94,17 @@ - + + + + + 全部 + + {{cv.name}} + + + + @@ -243,6 +253,7 @@ goods_list: [], search_keywords_value: '', nav_active_index: -1, + nav_active_item_index: -1, cart_status: false, // 收藏信息 favor_info: { @@ -419,7 +430,12 @@ }); // 分类id - var category_id = (this.nav_active_index == -1) ? 0 : this.goods_category[this.nav_active_index]['id']; + var temp_category = this.goods_category; + if(this.nav_active_item_index != -1) { + var category_id = temp_category[this.nav_active_index]['items'][this.nav_active_item_index]['id']; + } else { + var category_id = (this.nav_active_index == -1) ? 0 : temp_category[this.nav_active_index]['id']; + } // 获取数据 uni.request({ @@ -1030,6 +1046,7 @@ nav_event(e) { this.setData({ nav_active_index: e.currentTarget.dataset.index, + nav_active_item_index: e.currentTarget.dataset.itemindex, data_page: 1 }); this.reset_scroll();