|
|
|
@ -11,7 +11,7 @@ |
|
|
|
|
<scroll-view scroll-x class="goods-menu"> |
|
|
|
|
<view class="item" @click="tabItem1(item,index)" v-for="(item,index) in categoryList" :key="index" |
|
|
|
|
:class="tabIndex1==item?'item-on':''"> |
|
|
|
|
<image :src="item.image.external_url"></image> |
|
|
|
|
<image v-if="item.image" :src="item.image.external_url"></image> |
|
|
|
|
<view class="p">{{item.name}}</view> |
|
|
|
|
</view> |
|
|
|
|
</scroll-view> |
|
|
|
@ -22,10 +22,10 @@ |
|
|
|
|
</scroll-view> |
|
|
|
|
<view class="b"> |
|
|
|
|
<view class="t"> |
|
|
|
|
<view class="item" @click="tabFilter(0)" :class="filterIndex==0?'item-on':''">价格</view> |
|
|
|
|
<view class="item" @click="tabFilter(1)" :class="filterIndex==1?'item-on':''">折扣</view> |
|
|
|
|
<view class="item" @click="tabFilter(2)" :class="filterIndex==2?'item-on':''">销量</view> |
|
|
|
|
<view class="item" @click="tabFilter(3)" :class="filterIndex==3?'item-on':''">综合</view> |
|
|
|
|
<view class="item" @click="tabFilter(0,1)" :class="filterIndex==0?'item-on':''">价格</view> |
|
|
|
|
<view class="item" @click="tabFilter(1,3)" :class="filterIndex==1?'item-on':''">折扣</view> |
|
|
|
|
<view class="item" @click="tabFilter(2,5)" :class="filterIndex==2?'item-on':''">销量</view> |
|
|
|
|
<view class="item" @click="tabFilter(3,7)" :class="filterIndex==3?'item-on':''">综合</view> |
|
|
|
|
</view> |
|
|
|
|
<scroll-view scroll-y class="l"> |
|
|
|
|
<view class="item" v-for="(item,index) in list" :key="index" @click="goodsDetail(item.goods_id)" |
|
|
|
@ -130,30 +130,26 @@ |
|
|
|
|
app.list = []; |
|
|
|
|
this.getBrandList(item.children[0].category_id) |
|
|
|
|
}, |
|
|
|
|
tabFilter(index) { |
|
|
|
|
tabFilter(index, stuts) { |
|
|
|
|
this.filterIndex = index; |
|
|
|
|
this.orderSort = '' |
|
|
|
|
if (index == 0) { |
|
|
|
|
this.orderSort = 1 |
|
|
|
|
this.orderSort = this.orderSort == 1 ? 2 : 1 |
|
|
|
|
this.orderSort = stuts == 1 ? 2 : 1 |
|
|
|
|
} |
|
|
|
|
if (index == 1) { |
|
|
|
|
this.orderSort = 3 |
|
|
|
|
this.orderSort = this.orderSort == 1 ? 4 : 3 |
|
|
|
|
this.orderSort = stuts == 3 ? 4 : 3 |
|
|
|
|
} |
|
|
|
|
if (index == 3) { |
|
|
|
|
this.orderSort = 5 |
|
|
|
|
this.orderSort = this.orderSort == 1 ? 6 : 5 |
|
|
|
|
if (index == 2) { |
|
|
|
|
this.orderSort = stuts == 5 ? 6 : 5 |
|
|
|
|
} |
|
|
|
|
if (index == 4) { |
|
|
|
|
this.orderSort = 7; |
|
|
|
|
this.orderSort = this.orderSort == 1 ? 8 : 7 |
|
|
|
|
if (index == 3) { |
|
|
|
|
this.orderSort = stuts == 7 ? 8 : 7 |
|
|
|
|
} |
|
|
|
|
this.getBrandList(app.categoryChildren[0].category_id) |
|
|
|
|
console.log(this.orderSort) |
|
|
|
|
this.getBrandList(this.categoryChildren[0].category_id) |
|
|
|
|
}, |
|
|
|
|
goodsDetail(orderId) { |
|
|
|
|
uni.navigateTo({ |
|
|
|
|
url: '/pages/goods/detail?orderId='+orderId |
|
|
|
|
url: '/pages/goods/detail?orderId=' + orderId |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|