fanfan 9 months ago
commit 033556ace4
  1. 19
      pages/category/index.vue

@ -17,13 +17,15 @@
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-box" v-for="(item1, index1) in item.children" :key="index1" >
<view class="item-title">
<text>{{item.name}}</text>
<text>{{item1.name}}</text>
</view>
<view class="item-container">
<view class="thumb-box" @click="goodsDetail(item1)" v-for="(item1, index1) in item.children" :key="index1">
<image class="item-menu-image" :src="item1.image?item1.image.external_url:''" mode=""></image>
<view class="item-menu-name">{{item1.name}}</view>
<view class="thumb-box" @click="goodsDetail(item2)" v-for="(item2, index2) in item1.children" :key="index2">
<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>
@ -160,7 +162,7 @@
}
rects.forEach((rect) => {
// rects[0].top()
this.arr.push(rect.top - rects[0].top);
this.arr.push(rect.top - rects[0].top + 5);
resolve();
})
}).exec()
@ -285,7 +287,12 @@
.class-item:last-child {
min-height: 100vh;
}
.item-box{
margin-top: 30rpx;
&:first-child{
margin-top: 0;
}
}
.item-title {
font-size: 28rpx;
color: $u-main-color;

Loading…
Cancel
Save