|
|
@ -34,7 +34,7 @@ |
|
|
|
<text class="label">{{ shopDetail.shop_label }}</text> |
|
|
|
<text class="label">{{ shopDetail.shop_label }}</text> |
|
|
|
<view @click="toCer"> |
|
|
|
<view @click="toCer"> |
|
|
|
<image src="/static/cer.png" mode="aspectFill"></image> |
|
|
|
<image src="/static/cer.png" mode="aspectFill"></image> |
|
|
|
证书 |
|
|
|
证照 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
@ -54,7 +54,17 @@ |
|
|
|
<view class="goods-content"> |
|
|
|
<view class="goods-content"> |
|
|
|
<view class="first-cate"> |
|
|
|
<view class="first-cate"> |
|
|
|
<scroll-view class="first-cate-tabs" scroll-y> |
|
|
|
<scroll-view class="first-cate-tabs" scroll-y> |
|
|
|
<view v-for="(item, index) in goodsCate" :key="index" class="cate-item" :class="{active: firstCate === item.category_id}" @click="firstCate = item.category_id;secondCate = '';"> |
|
|
|
<view |
|
|
|
|
|
|
|
v-for="(item, index) in goodsCate" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
class="cate-item" |
|
|
|
|
|
|
|
:class="{ |
|
|
|
|
|
|
|
active: firstCate === item.category_id, |
|
|
|
|
|
|
|
prev: goodsCate[index + 1] && goodsCate[index + 1].category_id === firstCate, |
|
|
|
|
|
|
|
next: goodsCate[index - 1] && goodsCate[index - 1].category_id === firstCate, |
|
|
|
|
|
|
|
}" |
|
|
|
|
|
|
|
@click="firstCate = item.category_id;secondCate = '';" |
|
|
|
|
|
|
|
> |
|
|
|
{{ item.name }} |
|
|
|
{{ item.name }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</scroll-view> |
|
|
|
</scroll-view> |
|
|
@ -120,7 +130,7 @@ |
|
|
|
filterList: [ |
|
|
|
filterList: [ |
|
|
|
{ name: '综合', value: 'all' }, |
|
|
|
{ name: '综合', value: 'all' }, |
|
|
|
{ name: '价格', value: 'price' }, |
|
|
|
{ name: '价格', value: 'price' }, |
|
|
|
{ name: '折扣', value: 'discount' }, |
|
|
|
// { name: '折扣', value: 'discount' }, |
|
|
|
{ name: '销量', value: 'sales' }], |
|
|
|
{ name: '销量', value: 'sales' }], |
|
|
|
isTop: false, |
|
|
|
isTop: false, |
|
|
|
page: 1, |
|
|
|
page: 1, |
|
|
@ -173,7 +183,14 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
back() { |
|
|
|
back() { |
|
|
|
|
|
|
|
let pages = getCurrentPages(); |
|
|
|
|
|
|
|
if (pages.length > 1) { |
|
|
|
uni.navigateBack(); |
|
|
|
uni.navigateBack(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
uni.reLaunch({ |
|
|
|
|
|
|
|
url: "/pages/index/index" |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
search() { |
|
|
|
search() { |
|
|
|
// 跳转商品搜索 |
|
|
|
// 跳转商品搜索 |
|
|
@ -252,7 +269,7 @@ |
|
|
|
console.log(data); |
|
|
|
console.log(data); |
|
|
|
this.goods = this.goods.concat(data); |
|
|
|
this.goods = this.goods.concat(data); |
|
|
|
this.finished = data.length < 10; |
|
|
|
this.finished = data.length < 10; |
|
|
|
this.loadTitle = this.finished ? "已全部加载完" : "上拉加载更多"; |
|
|
|
this.loadTitle = this.finished ? "我是有底线的哦~" : "上拉加载更多"; |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, 500), |
|
|
|
}, 500), |
|
|
|
toCart() { |
|
|
|
toCart() { |
|
|
@ -472,14 +489,22 @@ |
|
|
|
.first-cate-tabs { |
|
|
|
.first-cate-tabs { |
|
|
|
overflow-x: hidden; |
|
|
|
overflow-x: hidden; |
|
|
|
overflow-y: auto; |
|
|
|
overflow-y: auto; |
|
|
|
|
|
|
|
background: #fff; |
|
|
|
.cate-item { |
|
|
|
.cate-item { |
|
|
|
width: 100%; |
|
|
|
width: 100%; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
padding: 20rpx 30rpx; |
|
|
|
color: #999999; |
|
|
|
color: #999999; |
|
|
|
font-size: 24rpx; |
|
|
|
font-size: 24rpx; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
|
|
|
|
background: #F0F4F3; |
|
|
|
|
|
|
|
&.prev { |
|
|
|
|
|
|
|
border-radius: 0 0 30rpx 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
&.next { |
|
|
|
|
|
|
|
border-radius: 0 30rpx 0 0; |
|
|
|
|
|
|
|
} |
|
|
|
&.active { |
|
|
|
&.active { |
|
|
|
background: #fff; |
|
|
|
background: transparent; |
|
|
|
&::before { |
|
|
|
&::before { |
|
|
|
content: ''; |
|
|
|
content: ''; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
@ -557,7 +582,7 @@ |
|
|
|
margin-right: 0; |
|
|
|
margin-right: 0; |
|
|
|
} |
|
|
|
} |
|
|
|
>image { |
|
|
|
>image { |
|
|
|
width: 290rpx; |
|
|
|
width: 100%; |
|
|
|
height: 287rpx; |
|
|
|
height: 287rpx; |
|
|
|
} |
|
|
|
} |
|
|
|
.name { |
|
|
|
.name { |
|
|
|