main
fanfan 7 months ago
parent 07acb3c36b
commit 205f0d9d60
  1. 25
      pages/goods/list.vue

@ -13,7 +13,8 @@
<template v-if="options.categoryId">
<view class="goodsban" v-if="tabbar && tabbar.length > 0">
<scroll-view class="typeList" scroll-x="true">
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg" @click="onChage(item,1,index)"
<view v-for="(item,index) in tabbar" :key="index" class="bandsImg"
@click="onChage(item,1,index)"
:style="{'color':item.category_id==isBanrdActive?'#F43B21':'#5A5A5A','border':item.category_id==isBanrdActive?'1rpx solid #F22029':'1rpx solid #E7E7E7'}">
<image :src="item.image?item.image.external_url:''" mode="aspectFill"></image>
<view class="typeItem">{{item.name}}</view>
@ -35,7 +36,8 @@
<view class="sort-item" :class="{ active: sortType === 'all' }" @click="handleSortType('all')">
<text>综合</text>
</view>
<view class="sort-item" :class="{ active: sortType === 'sales' }" @click="handleSortType('sales')">
<view class="sort-item" :class="{ active: sortType === 'sales' }"
@click="handleSortType('sales')">
<text>销量</text>
</view>
<view class="sort-item sort-item-price" :class="{ active: sortType === 'price' }"
@ -44,7 +46,8 @@
<view class="price-arrow">
<view class="icon up" :class="{ active: sortType === 'price' && !sortPrice }">
<u-icon name="arrow-up-fill"
:color="!sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17"></u-icon>
:color="!sortPrice&&sortType === 'price'?'#F43B21':'#3C3C3C'" size="17">
</u-icon>
</view>
<view class="icon down" :class="{ active: sortType === 'price' && sortPrice }">
<u-icon name="arrow-down-fill"
@ -53,7 +56,8 @@
</view>
</view>
<view class="sort-item" :class="{ active: sortType === 'city' }" @click="handleSortType('city')">
<view class="sort-item" :class="{ active: sortType === 'city' }"
@click="handleSortType('city')">
<picker mode="selector" @change="multiChange" value="{{multiIndex}}" :range="multiArray"
range-key="name">
<text>类型</text>
@ -337,7 +341,14 @@
that.tabbar = res.data.list;
that.isBanrdActive = 0
that.list = [];
if (this.options.categoryId) {
that.onChage(that.tabbar[0], 1, 0)
}else{
this.$refs.uWaterfall1.clear();
this.list.data = []
this.list = []
this.mescroll.resetUpScroll()
}
// res.data.list.forEach(item => {
// item.children.forEach(item_1 => {
// that.goodsType.push(item_1)
@ -366,7 +377,6 @@
this.keyName1 = item.name
}
}
if (type == 2) {
if (item.category_id == this.isActive) {
this.isActive = '';
@ -548,6 +558,7 @@
::v-deep .u-empty {
padding: 100rpx 0;
}
.head {
width: 100%;
overflow: hidden;
@ -557,9 +568,11 @@
width: 100%;
left: 0;
}
.blank {
height: 416rpx;
}
//
.header {
background-color: #fff;
@ -591,6 +604,7 @@
.store-sort {
color: #000;
width: 100%;
.store-box {
display: flex;
padding: 20rpx 0;
@ -789,6 +803,7 @@
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
image {
width: 28rpx;
height: 28rpx;

Loading…
Cancel
Save