StoreCard.vue
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<template>
<view class="price_list">
<u-scroll-list :indicator="false">
<view v-for="(item, index) in priceList" :key="index" class="scroll_box" >
<view class="price_card" :class="{active: current === index}" @click="current = index">
<view style="color: #fff;" class="f-24 l-h-32">¥<text class="price">{{ item.price }}</text></view>
<text class="col-f f-28 l-h-38 f-w-500">尝鲜套餐</text>
<text style="line-height: 26rpx;margin: 4rpx 0;" class="col-f f-22">剧本杀+密室逃脱</text>
<text style="color: #fff;" class="f-24 l-h-32">限6个场地</text>
</view>
<view class="tip" :class="{active: current === index}">30天</view>
</view>
</u-scroll-list>
<view class="col-f f-24 l-h-32 m-top30">*激活门店类型超过<text style="color: #FFC8A1;">2</text>个,每个月享受<text style="color: #FFC8A1;">7</text>折优惠!</view>
</view>
</template>
<script>
export default {
props: {
priceList: {
type: Array,
require: true
}
},
data(){
return {
current: 0
}
}
}
</script>
<style lang="scss" scoped>
.price_list{
padding: 30rpx;
border-bottom: 2rpx solid #666;
.scroll_box{
position: relative;
margin-right: 16rpx;
&:last-child{
margin-right: 0;
}
.tip{
position: absolute;
top: 0;
right: 0;
width: 80rpx;
height: 32rpx;
background: #47878A;
border-radius: 0rpx 12rpx 0rpx 12rpx;
text-align: center;
line-height: 32rpx;
color: #fff;
font-size: 24rpx;
&.active{
color: #47878A;
background: #fff;
}
}
}
.price_card{
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding-top: 42rpx;
width: 220rpx;
height: 240rpx;
background: #3B696B;
border-radius: 12rpx 12rpx 12rpx 12rpx;
&.active{
border: 4rpx solid #fff;
}
.price{
font-weight: 600;
font-size: 60rpx;
line-height: 80rpx;
margin: 2rpx 0 8rpx 0;
}
.oldPrice{
text-decoration: line-through;
color: #bbb;
font-size: 24rpx;
line-height: 32rpx;
margin: 8rpx 0 10rpx 0;
}
.tip{
width: 140rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
font-size: 24rpx;
color: #fff;
background: #F2D4A2;
border-radius: 200rpx;
}
}
}
</style>