1

parent a54f97b0
...@@ -37,15 +37,17 @@ ...@@ -37,15 +37,17 @@
</view> </view>
<view class="sort"> <view class="sort">
<view style="display: flex; flex-direction: row"> <view style="display: flex; flex-direction: row">
<view <scroll-view class="box-red" scroll-x="true" @scroll="scroll">
class="borderClass" <view
@click="toBuilding(item)" class="borderClass"
v-for="(item, index) in sortList" @click="toBuilding(item)"
:key="index" v-for="(item, index) in sortList"
> :key="index"
<image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" /> >
<view class="sort-text">{{ item.categoryName }}</view> <image mode="aspectFill" :src="item.icon" style="width: 96rpx; height: 96rpx" />
</view> <view class="sort-text">{{ item.categoryName }}</view>
</view>
</scroll-view>
</view> </view>
</view> </view>
<view class="product-page" v-for="(item, index) in list" :key="index"> <view class="product-page" v-for="(item, index) in list" :key="index">
...@@ -109,7 +111,7 @@ const getList = () => { ...@@ -109,7 +111,7 @@ const getList = () => {
res.data.forEach((item) => { res.data.forEach((item) => {
item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic; item.icon = import.meta.env.VITE_APP_IMG_URL + item.pic;
}); });
sortList.value = res.data.splice(0, 4); sortList.value = res.data;
}); });
}; };
// 筑农严选首页-分类预售商品列表 // 筑农严选首页-分类预售商品列表
...@@ -205,11 +207,16 @@ page { ...@@ -205,11 +207,16 @@ page {
height: 186rpx; height: 186rpx;
background: linear-gradient(180deg, #82ce8b -39%, #ffffff 36%); background: linear-gradient(180deg, #82ce8b -39%, #ffffff 36%);
} }
.box-red {
white-space: nowrap;
width: 100%;
}
.borderClass { .borderClass {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
margin-left: 75rpx; margin: 0 36rpx;
margin-top: 22rpx; margin-top: 22rpx;
display: inline-block;
} }
.sort-text { .sort-text {
font-size: 24rpx; font-size: 24rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment