<template>
|
<view class="box">
|
<view class="cate">
|
<view class="cate-item" @click="i = index" v-for="(item, index) in cate" :key="index">
|
<text>{{item.name}}</text>
|
<view class="cate-item-x" v-if="i === index"></view>
|
</view>
|
</view>
|
<view class="list">
|
<view class="item disable">
|
<view class="item-a">
|
<text class="item-a-num">8</text>
|
<text>满100可用</text>
|
</view>
|
<view class="item-b">
|
<view class="item-b-left">
|
<text>新客专享</text>
|
<text>2020.5.25 日到期</text>
|
</view>
|
<image src="/static/images/ic_yishiyong@2x.png" mode="widthFix"></image>
|
<!-- <view class="item-b-btn">查看详情</view> -->
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
i: 0,
|
cate: [
|
{ name: '未使用', id: 0 },
|
{ name: '已使用', id: 1 },
|
{ name: '已过期', id: 2 }
|
]
|
};
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.box {
|
width: 100%;
|
.cate {
|
width: 100%;
|
height: 90rpx;
|
display: flex;
|
align-items: center;
|
border-bottom: 1rpx solid #E5E5E5;
|
position: sticky;
|
top: 0;
|
left: 0;
|
z-index: 999;
|
.cate-item {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
position: relative;
|
text {
|
font-weight: 400;
|
font-size: 30rpx;
|
color: #666666;
|
}
|
.cate-item-x {
|
position: absolute;
|
bottom: 0;
|
left: 50%;
|
width: 40rpx;
|
height: 6rpx;
|
background-color: #004096;
|
transform: translate(-50%, 0);
|
}
|
}
|
}
|
.list {
|
width: 100%;
|
padding: 30rpx;
|
box-sizing: border-box;
|
.disable {
|
background: #EFEFEF !important;
|
.item-a {
|
.item-a-num {
|
color: #999999 !important;
|
&::before {
|
color: #999999 !important;
|
}
|
}
|
text {
|
color: #999999 !important;
|
}
|
}
|
.item-b {
|
.item-b-left {
|
text {
|
color: #999999 !important;
|
}
|
}
|
image {
|
width: 92rpx;
|
height: 92rpx;
|
}
|
}
|
}
|
.item {
|
width: 100%;
|
height: 170rpx;
|
display: flex;
|
align-items: center;
|
background: #FFEFEF;
|
border-radius: 16rpx;
|
margin-bottom: 20rpx;
|
&:last-child {
|
margin: 0 !important;
|
}
|
.item-a {
|
width: 208rpx;
|
height: 100%;
|
flex-shrink: 0;
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
border-right: 1rpx dashed #E3C1C1;
|
.item-a-num {
|
font-weight: 600;
|
font-size: 44rpx;
|
color: #E4001D;
|
&::before {
|
content: '¥';
|
font-weight: 600;
|
font-size: 24rpx;
|
color: #E4001D;
|
}
|
}
|
text {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #E93047;
|
margin-top: 8rpx;
|
}
|
}
|
.item-b {
|
flex: 1;
|
padding: 0 30rpx;
|
box-sizing: border-box;
|
height: 100%;
|
display: flex;
|
align-items: center;
|
.item-b-left {
|
flex: 1;
|
height: 100%;
|
display: flex;
|
flex-direction: column;
|
justify-content: center;
|
text {
|
&:nth-child(1) {
|
font-weight: 500;
|
font-size: 32rpx;
|
color: #222222;
|
}
|
&:nth-child(2) {
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #777777;
|
margin-top: 12rpx;
|
}
|
}
|
}
|
.item-b-btn {
|
flex-shrink: 0;
|
width: 144rpx;
|
height: 56rpx;
|
line-height: 56rpx;
|
text-align: center;
|
font-weight: 400;
|
font-size: 24rpx;
|
color: #E93047;
|
border-radius: 28rpx;
|
border: 1rpx solid #FF9DA9;
|
}
|
}
|
}
|
}
|
}
|
</style>
|