<template>
|
<view class="box">
|
<view class="box_cate">
|
<view class="box_cate_item" v-for="(item, index) in cates" :key="index" @click="change(index)">
|
<view class="box_cate_item_top">
|
<text :class="index === i ? 'activefont' : ''">{{item.name}}</text>
|
<text v-if="item.num">{{item.num}}</text>
|
</view>
|
<view class="box_cate_item_x" v-if="index === i"></view>
|
</view>
|
</view>
|
<view class="box_list">
|
<view class="box_list_item" v-for="(item, index) in 3" :key="index">
|
<view class="head">
|
<view class="head_left">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
<text>木**王</text>
|
</view>
|
<text>2022-12-29</text>
|
</view>
|
<view class="divide">
|
<uni-rate size="18" :value="3" color="#bbb" active-color="red" />
|
<view class="divide_x"></view>
|
<text>白色</text>
|
</view>
|
<view class="info">
|
能用这个价位买到这样的质量真心值啦,做工精致用料
|
实在讲究,商家用心喽,不说价位质量与几百相比没什
|
么区别,值得购入!
|
</view>
|
<view class="list">
|
<view class="list_item">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
</view>
|
<view class="list_item">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
</view>
|
<view class="list_item">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
</view>
|
<view class="list_itemx"></view>
|
</view>
|
<view class="zan">
|
<image src="@/static/icon/ic_dianzan@2x.png" mode="widthFix"></image>
|
<text>2</text>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
i: 0,
|
cates: [
|
{ name: '全部', num: '' },
|
{ name: '图片/视频', num: '29' },
|
{ name: '好评', num: '86' },
|
{ name: '中评', num: '2' },
|
{ name: '差评', num: '0' }
|
]
|
}
|
},
|
methods: {
|
change(index) {
|
this.i = index
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_cate {
|
width: 100%;
|
height: 84rpx;
|
display: flex;
|
align-items: center;
|
background: #FFFFFF;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
border-bottom: 2rpx solid #F4F5F4;
|
position: sticky;
|
top: 0;
|
left: 0;
|
.box_cate_item {
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
margin-right: 46rpx;
|
&:last-child {
|
margin-right: 0 !important;
|
}
|
.box_cate_item_top {
|
display: flex;
|
align-items: center;
|
.activefont {
|
font-size: 32rpx !important;
|
font-weight: 500 !important;
|
color: #333333 !important;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #666666;
|
&:first-child {
|
margin-right: 5rpx;
|
}
|
}
|
}
|
.box_cate_item_x {
|
width: 40rpx;
|
height: 4rpx;
|
background: #D20A0A;
|
border-radius: 12rpx;
|
margin-top: 8rpx;
|
}
|
}
|
}
|
.box_list {
|
width: 100%;
|
.box_list_item {
|
width: 100%;
|
padding: 28rpx 32rpx;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
margin-bottom: 16rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.head {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
.head_left {
|
display: flex;
|
align-items: center;
|
image {
|
width: 64rpx;
|
height: 64rpx;
|
border-radius: 50%;
|
margin-right: 12rpx;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
}
|
}
|
.divide {
|
display: flex;
|
align-items: center;
|
margin-top: 22rpx;
|
.divide_x {
|
width: 0rpx;
|
height: 12rpx;
|
margin: 0 12rpx;
|
border: 1rpx solid #999999;
|
}
|
text {
|
font-size: 20rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
}
|
.info {
|
font-size: 28rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #000000;
|
margin-top: 26rpx;
|
}
|
.list {
|
margin-top: 14rpx;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
.list_itemx {
|
width: 220rpx;
|
height: 0;
|
}
|
.list_item {
|
width: 220rpx;
|
height: 220rpx;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
}
|
.zan {
|
margin-top: 20rpx;
|
display: flex;
|
align-items: center;
|
justify-content: flex-end;
|
image {
|
width: 30rpx;
|
height: 30rpx;
|
margin-right: 6rpx;
|
}
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
}
|
}
|
}
|
}
|
}
|
</style>
|