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