|
|
@ -16,14 +16,16 @@ |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> |
|
|
|
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> |
|
|
|
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> |
|
|
|
<view class="page-view"> |
|
|
|
<view class="page-view"> |
|
|
|
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index"> |
|
|
|
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index"> |
|
|
|
<view class="item-title"> |
|
|
|
<view class="item-box" v-for="(item1, index1) in item.children" :key="index1" > |
|
|
|
<text>{{item.name}}</text> |
|
|
|
<view class="item-title"> |
|
|
|
</view> |
|
|
|
<text>{{item1.name}}</text> |
|
|
|
<view class="item-container"> |
|
|
|
</view> |
|
|
|
<view class="thumb-box" @click="goodsDetail(item1)" v-for="(item1, index1) in item.children" :key="index1"> |
|
|
|
<view class="item-container"> |
|
|
|
<image class="item-menu-image" :src="item1.image?item1.image.external_url:''" mode=""></image> |
|
|
|
<view class="thumb-box" @click="goodsDetail(item2)" v-for="(item2, index2) in item1.children" :key="index2"> |
|
|
|
<view class="item-menu-name">{{item1.name}}</view> |
|
|
|
<image class="item-menu-image" :src="item2.image?item2.image.external_url:''" mode=""></image> |
|
|
|
|
|
|
|
<view class="item-menu-name">{{item2.name}}</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -160,7 +162,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
rects.forEach((rect) => { |
|
|
|
rects.forEach((rect) => { |
|
|
|
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况) |
|
|
|
// 这里减去rects[0].top,是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况) |
|
|
|
this.arr.push(rect.top - rects[0].top); |
|
|
|
this.arr.push(rect.top - rects[0].top + 5); |
|
|
|
resolve(); |
|
|
|
resolve(); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}).exec() |
|
|
|
}).exec() |
|
|
@ -285,7 +287,12 @@ |
|
|
|
.class-item:last-child { |
|
|
|
.class-item:last-child { |
|
|
|
min-height: 100vh; |
|
|
|
min-height: 100vh; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.item-box{ |
|
|
|
|
|
|
|
margin-top: 30rpx; |
|
|
|
|
|
|
|
&:first-child{ |
|
|
|
|
|
|
|
margin-top: 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
.item-title { |
|
|
|
.item-title { |
|
|
|
font-size: 28rpx; |
|
|
|
font-size: 28rpx; |
|
|
|
color: $u-main-color; |
|
|
|
color: $u-main-color; |
|
|
|