vipRecharge.vue
3.3 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<template>
<view class="vip_recharge">
<!-- 头部详情 -->
<view class="vip_head">
<image class="head_cover" src="@/static/images/arenaDetail/vip_bg.png" mode="widthFix"></image>
<u-navbar
title="申请场馆会员卡"
:autoBack="true"
:bgColor="bgColor"
/>
<view class="uesrInfoCard">
<view class="userInfo">
<u-avatar :src="src"></u-avatar>
<text class="name">CLOOL</text>
<text class="phone">(158****1234)</text>
</view>
</view>
</view>
<!-- 充值列表 -->
<view class="vip_list">
<view class="list_title">VIP会员</view>
<view class="price_list">
<PriceCard v-for="(item, index) in priceList" :key="index" :info="item" :active="index === current" @toggle="ontoggle(item, index)"/>
</view>
<view class="pay_btn">确认并支付¥{{ price }}</view>
<view class="agreement">
<u-checkbox-group>
<u-checkbox v-model="checked" shape="circle" :activeColor="ThemeColor.PrimaryColor" label="开通前请阅读《世纪创软运动系列会员服务协议》"></u-checkbox>
</u-checkbox-group>
</view>
</view>
</view>
</template>
<script>
import PriceCard from './components/priceCard.vue'
import ThemeColor from '@/utils/themeColor'
export default {
components: { PriceCard },
data(){
return {
current: 0,
ThemeColor,
bgColor: 'transparent',
checked: false,
price: 0,
priceList: [
{ name: '3次卡', price: 40, oldPrice: 68, avgText: '约13.3/次'},
{ name: '周卡', price: 150, oldPrice: 500, avgText: '约21.4/天'},
{ name: '季卡', price: 999, oldPrice: 1500, avgText: '约333/月'},
{ name: '年卡', price: 3000, oldPrice: 5000, avgText: '约250/月'}
],
src: 'https://cdn.uviewui.com/uview/album/1.jpg'
}
},
mounted() {
this.price = this.priceList[0].price
},
methods: {
ontoggle(item, index){
this.current = index
this.price = item.price
}
}
}
</script>
<style lang="scss" scoped>
.vip_recharge{
min-height: 100vh;
}
// 头部
.vip_head{
position: relative;
height: 540rpx;
overflow: hidden;
.head_cover{
position: absolute;
top: 0;
left: 0;
width: 100%;
}
.uesrInfoCard {
width: 100%;
position: absolute;
bottom: 40rpx;
padding: 0 30rpx;
height: 100rpx;
box-sizing: border-box;
.userInfo{
display: flex;
align-items: center;
height: 100%;
padding: 0 40rpx;
background: rgba(255,255,255,0.7);
border-radius: 16rpx;
color: #999999;
font-size: 24rpx;
.name{
margin-left: 20rpx;
color: #3d3d3d;
font-size: 28rpx;
}
}
}
}
// 充值列表
.vip_list{
position: relative;
min-height: calc(100vh - 540rpx);
background-color: #fff;
margin-top: -55rpx;
border-radius: 40rpx 40rpx 0rpx 0rpx;
padding: 40rpx 30rpx 0;
.list_title{
font-size: 36rpx;
line-height: 48rpx;
font-weight: 600;
color: #3d3d3d;
padding-left: 30rpx;
margin-bottom: 20rpx;
}
.price_list{
display: flex;
flex-wrap: wrap;
gap: 30rpx;
}
.pay_btn{
margin: 30rpx 0;
width: 100%;
height: 100rpx;
background: linear-gradient( 90deg, #FFD176 0%, #FEDE9C 100%);
border-radius: 200rpx;
line-height: 100rpx;
text-align: center;
font-size: 40rpx;
color: #722F06;
}
}
</style>