<template>
|
<view class="box">
|
<view class="box_cate">
|
<view class="box_cate_item" v-for="(item, index) in cate" :key="index" @click="changeItem(index)">
|
<text :class="i === index ? 'active' : ''">{{item}}</text>
|
<view class="box_cate_item_x" v-if="i === index"></view>
|
</view>
|
</view>
|
<view class="box_list">
|
<view class="box_list_item" v-for="(item, index) in 3" :key="index">
|
<view class="box_list_item_box borderhui">
|
<view class="box_list_item_left">
|
<view class="box_list_item_left_a">
|
<text class="hui">¥</text>
|
<text class="hui">3</text>
|
</view>
|
<text class="box_list_item_left_b hui">满3.01元可用</text>
|
</view>
|
<view class="box_list_item_right">
|
<view class="top">
|
<view class="top_box">
|
<view class="top_a">3元无门槛优惠券</view>
|
<view class="top_b">商城全场通用</view>
|
<view class="top_c">有效期至 2023-05-11 23:59</view>
|
</view>
|
<!-- <view class="top_btn">立即使用</view> -->
|
<view class="top_img">
|
<image src="@/static/uni.png" mode="widthFix"></image>
|
</view>
|
</view>
|
<view class="x"></view>
|
<view class="bottom">
|
<text>使用规则</text>
|
<uni-icons type="bottom" size="15" color="#333333"></uni-icons>
|
</view>
|
</view>
|
</view>
|
<view class="box_list_item_xia borderhui">
|
仅限本手机号作为收货手机号
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
cate: ['未使用', '已使用', '已过期'],
|
i: 0
|
}
|
},
|
methods: {
|
changeItem(index) {
|
this.i = index;
|
}
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.box_cate {
|
width: 100%;
|
height: 84rpx;
|
display: flex;
|
align-items: center;
|
position: sticky;
|
top: 0;
|
left: 0;
|
background: #FFFFFF;
|
border: 2rpx solid #F4F5F4;
|
.box_cate_item {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
.active {
|
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;
|
}
|
.box_cate_item_x {
|
width: 40rpx;
|
height: 4rpx;
|
background: #D20A0A;
|
border-radius: 12rpx;
|
margin-top: 8rpx;
|
}
|
}
|
}
|
.box_list {
|
padding: 24rpx 32rpx;
|
box-sizing: border-box;
|
.borderhui {
|
border: 2rpx solid #999999 !important;
|
}
|
.box_list_item {
|
width: 100%;
|
// padding: 32rpx 20rpx 18rpx 28rpx;
|
// overflow: hidden;
|
// height: 270rpx;
|
box-sizing: border-box;
|
background: #D9D9D9;
|
border-radius: 12rpx;
|
// border: 2rpx solid #D20A0A;
|
display: flex;
|
// align-items: center;
|
flex-direction: column;
|
margin-bottom: 16rpx;
|
&:last-child {
|
margin-bottom: 0 !important;
|
}
|
.box_list_item_box {
|
width: 100%;
|
height: 270rpx;
|
display: flex;
|
align-items: center;
|
overflow: hidden;
|
border: 2rpx solid #D20A0A;
|
box-sizing: border-box;
|
border-radius: 12rpx;
|
.box_list_item_left {
|
width: 200rpx;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
flex-direction: column;
|
margin-right: 32rpx;
|
.hui {
|
color: #999999 !important;
|
}
|
.box_list_item_left_a {
|
display: flex;
|
align-items: center;
|
text {
|
&:first-child {
|
font-size: 36rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
margin-top: 35rpx;
|
}
|
&:last-child {
|
font-size: 76rpx;
|
font-family: PingFang SC-Semibold, PingFang SC;
|
font-weight: 600;
|
color: #D20A0A;
|
}
|
}
|
}
|
.box_list_item_left_b {
|
font-size: 24rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #D20A0A;
|
margin-top: 24rpx;
|
}
|
}
|
.box_list_item_right {
|
flex: 1;
|
height: 100%;
|
padding: 32rpx 20rpx 18rpx 32rpx;
|
box-sizing: border-box;
|
display: flex;
|
flex-direction: column;
|
justify-content: space-between;
|
background-color: #FFFFFF;
|
.top {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
.top_box {
|
display: flex;
|
flex-direction: column;
|
.top_a {
|
font-size: 32rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #333333;
|
}
|
.top_b {
|
font-size: 20rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
margin-top: 20rpx;
|
}
|
.top_c {
|
margin-top: 20rpx;
|
font-size: 20rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
}
|
}
|
.top_img {
|
width: 88rpx;
|
height: 88rpx;
|
image {
|
width: 100%;
|
height: 100%;
|
}
|
}
|
.top_btn {
|
width: 144rpx;
|
height: 52rpx;
|
line-height: 52rpx;
|
text-align: center;
|
background: linear-gradient(270deg, #D20A0A 0%, #D95A5A 100%);
|
border-radius: 30rpx;
|
font-size: 28rpx;
|
font-family: PingFang SC-Medium, PingFang SC;
|
font-weight: 500;
|
color: #FFFFFF;
|
}
|
}
|
.x {
|
width: 100%;
|
height: 2rpx;
|
background-color: #F4F5F4;
|
margin: 24rpx 0 10rpx 0;
|
}
|
.bottom {
|
display: flex;
|
align-items: center;
|
justify-content: space-between;
|
text {
|
font-size: 20rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #333333;
|
}
|
}
|
}
|
}
|
.box_list_item_xia {
|
padding: 20rpx;
|
width: 100%;
|
box-sizing: border-box;
|
background-color: #FFFFFF;
|
border-left: 2rpx solid #D20A0A;
|
border-right: 2rpx solid #D20A0A;
|
border-bottom: 2rpx solid #D20A0A;
|
font-size: 20rpx;
|
font-family: PingFang SC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #999999;
|
border-radius: 0rpx 0rpx 12rpx 12rpx;
|
}
|
}
|
}
|
}
|
</style>
|