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();