Commit 4aeaa2185414ed4e1abfdd31ca3209ea7f90d247
1 parent
d4ceceee
uniapp:【商品列表】样式 review
Showing
1 changed file
with
4 additions
and
1 deletions
yudao-ui-app/pages/category/product-list.vue
| @@ -3,10 +3,13 @@ | @@ -3,10 +3,13 @@ | ||
| 3 | <u-navbar :title="title" :autoBack="true" placeholder="true" titleStyle="font-size: 28rpx"> | 3 | <u-navbar :title="title" :autoBack="true" placeholder="true" titleStyle="font-size: 28rpx"> |
| 4 | </u-navbar> | 4 | </u-navbar> |
| 5 | <view class="context"> | 5 | <view class="context"> |
| 6 | + <!-- 分类列表 --> | ||
| 7 | + <!-- TODO @Luowenfeng:不应该展示商品分类;应该是上面一个筛选;之后是【综合】【销量】【价格】的排序 --> | ||
| 6 | <view class="tabs-top"> | 8 | <view class="tabs-top"> |
| 7 | <u-tabs :list="categoryList" @click="changeTabs" :current="current" lineHeight="2" lineWidth="85rpx" | 9 | <u-tabs :list="categoryList" @click="changeTabs" :current="current" lineHeight="2" lineWidth="85rpx" |
| 8 | itemStyle="padding-left: 15px; padding-right: 15px; height: 85rpx;"></u-tabs> | 10 | itemStyle="padding-left: 15px; padding-right: 15px; height: 85rpx;"></u-tabs> |
| 9 | </view> | 11 | </view> |
| 12 | + <!-- 商品列表 --> | ||
| 10 | <scroll-view scroll-y="true" class="product-list" enable-flex="true"> | 13 | <scroll-view scroll-y="true" class="product-list" enable-flex="true"> |
| 11 | <view class="flex-box"> | 14 | <view class="flex-box"> |
| 12 | <block v-for="(item, index) in productList[current]" :key="index"> | 15 | <block v-for="(item, index) in productList[current]" :key="index"> |
| @@ -52,7 +55,7 @@ | @@ -52,7 +55,7 @@ | ||
| 52 | }, | 55 | }, |
| 53 | methods: { | 56 | methods: { |
| 54 | changeTabs(item) { | 57 | changeTabs(item) { |
| 55 | - if (item.index != this.current) { | 58 | + if (item.index !== this.current) { |
| 56 | this.handleProductSpu(item.index) | 59 | this.handleProductSpu(item.index) |
| 57 | } | 60 | } |
| 58 | }, | 61 | }, |