<template>
|
<view class="box">
|
<!-- 轮播 -->
|
<view class="container_banner">
|
<uni-swiper-dot :info="info" :current="current" field="content" :dots-styles="dotsStyles" mode="dot">
|
<swiper class="swiper-box" @change="change">
|
<swiper-item v-for="(item, index) in 3" :key="index">
|
<view class="swiper-item">
|
<image src="@/static/images/Maskgroup@2x.png" mode="aspectFill"></image>
|
</view>
|
</swiper-item>
|
</swiper>
|
</uni-swiper-dot>
|
</view>
|
<view class="find_box_search_cate">
|
<view class="find_box_search_cate_item" v-for="(item, index) in cateList" :key="index" @click="i = index">
|
<text :class="i === index ? 'activeColor' : ''">{{item.name}}</text>
|
<view class="active" v-show="i === index"></view>
|
</view>
|
</view>
|
<view class="box_list">
|
<view class="fun_list_item" v-for="(item, index) in 3" :key="index">
|
<view class="fun_list_item_img">
|
<image src="@/static/uni.png" mode="heightFix"></image>
|
</view>
|
<view class="fun_list_item_info">
|
<view class="fun_list_item_info_top">
|
<text>飞盘之后,新中产又被围炉煮茶割韭菜?飞盘之后,新中产又</text>
|
</view>
|
<view class="fun_list_item_info_bottom">
|
<view class="fun_list_item_info_bottom_left">
|
<text>¥</text>
|
<text>179</text>
|
</view>
|
<view class="fun_list_item_info_bottom_right">
|
<text>已售619份</text>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
info: [{
|
content: '内容 A'
|
}, {
|
content: '内容 B'
|
}, {
|
content: '内容 C'
|
}],
|
dotsStyles: {
|
backgroundColor: '#FFFFFF',
|
border: '1px #FFFFFF solid',
|
color: '#fff',
|
selectedBackgroundColor: '#D20A0A',
|
selectedBorder: '1px #D20A0A solid'
|
},
|
cateList: [
|
{
|
name: '全部'
|
},
|
{
|
name: '周边'
|
},
|
{
|
name: '咖啡豆'
|
}
|
],
|
i: 0,
|
current: 0
|
}
|
},
|
methods: {
|
change(e) {
|
this.current = e.detail.current;
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
padding: 0 32rpx;
|
box-sizing: border-box;
|
.container_banner /deep/ {
|
width: 100%;
|
height: 892rpx;
|
margin-bottom: 40rpx;
|
.uni-swiper__warp {
|
width: 100%;
|
height: 100%;
|
}
|
.swiper-box {
|
width: 100%;
|
height: 100%;
|
.swiper-item {
|
width: 100%;
|
height: 100%;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
}
|
}
|
.find_box_search_cate {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
.find_box_search_cate_item {
|
display: flex;
|
align-items: center;
|
flex-direction: column;
|
margin-right: 38rpx;
|
&:last-child {
|
margin-right: 0 !important;
|
}
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #666666;
|
}
|
.activeColor {
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
.active {
|
width: 40rpx;
|
height: 4rpx;
|
background: #D20A0A;
|
border-radius: 12rpx;
|
margin-top: 8rpx;
|
}
|
}
|
}
|
.box_list {
|
margin-top: 36rpx;
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
flex-wrap: wrap;
|
.fun_list_item {
|
width: 332rpx;
|
height: 580rpx;
|
border-radius: 20rpx;
|
background-color: white;
|
overflow: hidden;
|
margin-bottom: 16rpx;
|
.fun_list_item_img {
|
width: 100%;
|
height: 420rpx;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
overflow: hidden;
|
image {
|
height: 100%;
|
}
|
}
|
.fun_list_item_info {
|
width: 100%;
|
padding: 16rpx 12rpx 24rpx 12rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
.fun_list_item_info_top {
|
width: 100%;
|
-webkit-line-clamp: 2;
|
display: -webkit-box;
|
-webkit-box-orient: vertical;
|
text-overflow: ellipsis;
|
overflow: hidden;
|
text {
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
}
|
.fun_list_item_info_bottom {
|
width: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
margin-top: 15rpx;
|
.fun_list_item_info_bottom_left {
|
display: flex;
|
align-items: center;
|
text {
|
&:first-child {
|
font-size: 20rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
margin-top: 11rpx;
|
}
|
&:last-child {
|
font-size: 32rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
}
|
}
|
}
|
.fun_list_item_info_bottom_right {
|
display: flex;
|
align-items: center;
|
text {
|
font-size: 24rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #999999;
|
}
|
}
|
}
|
}
|
}
|
}
|
}
|
</style>
|