|
@ -25,27 +25,41 @@ |
|
|
<!-- 分类商品列表 --> |
|
|
<!-- 分类商品列表 --> |
|
|
<view class="category" |
|
|
<view class="category" |
|
|
v-else> |
|
|
v-else> |
|
|
|
|
|
|
|
|
|
|
|
<view class="tabs"> |
|
|
|
|
|
<uv-tabs |
|
|
|
|
|
:list="category" |
|
|
|
|
|
:activeStyle="{color : '#f00', fontWeight : 600}" |
|
|
|
|
|
lineColor="#f00" |
|
|
|
|
|
:inactiveStyle="{color: 'rgba(0,0,0,.8)'}" |
|
|
|
|
|
lineHeight="8rpx" |
|
|
|
|
|
lineWidth="50rpx" |
|
|
|
|
|
:current="current" |
|
|
|
|
|
@click="clickTabs"></uv-tabs> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<uv-vtabs |
|
|
<uv-vtabs |
|
|
:list="category" |
|
|
|
|
|
:current="current" |
|
|
|
|
|
|
|
|
:list="category[current].children" |
|
|
|
|
|
:current="currentChildren" |
|
|
keyName="name" |
|
|
keyName="name" |
|
|
|
|
|
:chain="true" |
|
|
@change="change"> |
|
|
@change="change"> |
|
|
<view class="list"> |
|
|
|
|
|
<uv-vtabs-item> |
|
|
|
|
|
<view class="category-item" |
|
|
|
|
|
v-for="(item, index) in category[current].children" :key="index"> |
|
|
|
|
|
<view class="category-title"> |
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<productItem :item="pro" |
|
|
|
|
|
v-for="(pro, i) in item.shopList" :key="i" |
|
|
|
|
|
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<uv-empty mode="list" v-if="category[current].children.length == 0"></uv-empty> |
|
|
|
|
|
</uv-vtabs-item> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<!-- <view class="list"> --> |
|
|
|
|
|
<template v-for="(item, index) in category[current].children"> |
|
|
|
|
|
<uv-vtabs-item :index="index" :key="index"> |
|
|
|
|
|
<view class="category-item"> |
|
|
|
|
|
<view class="category-title"> |
|
|
|
|
|
{{ item.name }} |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<productItem :item="pro" |
|
|
|
|
|
v-for="(pro, i) in item.shopList" :key="i" |
|
|
|
|
|
@click="$utils.navigateTo(`/pages_order/product/productDetail?id=${pro.id}`)" /> |
|
|
|
|
|
</view> |
|
|
|
|
|
</uv-vtabs-item> |
|
|
|
|
|
</template> |
|
|
|
|
|
<uv-empty mode="list" v-if="category[current].children.length == 0"></uv-empty> |
|
|
|
|
|
<!-- </view> --> |
|
|
</uv-vtabs> |
|
|
</uv-vtabs> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -73,6 +87,7 @@ |
|
|
return { |
|
|
return { |
|
|
mixinsListApi: 'getClassShopPageList', |
|
|
mixinsListApi: 'getClassShopPageList', |
|
|
current : 0, |
|
|
current : 0, |
|
|
|
|
|
currentChildren : 0, |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -100,7 +115,11 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
change(e) { |
|
|
change(e) { |
|
|
// this.queryParams.classId = this.category[e].id |
|
|
// this.queryParams.classId = this.category[e].id |
|
|
this.current = e |
|
|
|
|
|
|
|
|
this.currentChildren = e |
|
|
|
|
|
}, |
|
|
|
|
|
clickTabs({index}){ |
|
|
|
|
|
this.current = index |
|
|
|
|
|
this.currentChildren = 0 |
|
|
}, |
|
|
}, |
|
|
search(){ |
|
|
search(){ |
|
|
for(let i = 0;i < 10;i++){ |
|
|
for(let i = 0;i < 10;i++){ |
|
@ -116,15 +135,15 @@ |
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.page { |
|
|
.page { |
|
|
/deep/ .uv-vtabs { |
|
|
/deep/ .uv-vtabs { |
|
|
height: calc(100vh - 470rpx) !important; |
|
|
|
|
|
|
|
|
height: calc(100vh - 600rpx) !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/deep/ .uv-vtabs__bar { |
|
|
/deep/ .uv-vtabs__bar { |
|
|
height: calc(100vh - 470rpx) !important; |
|
|
|
|
|
|
|
|
height: calc(100vh - 600rpx) !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/deep/ .uv-vtabs__content { |
|
|
/deep/ .uv-vtabs__content { |
|
|
height: calc(100vh - 470rpx) !important; |
|
|
|
|
|
|
|
|
height: calc(100vh - 600rpx) !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.search { |
|
|
.search { |
|
|