paysuccess.vue
4.4 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<template>
<view class="pay_success">
<view class="header_box"></view>
<view class="content_box">
<view class="dataCard">
<!-- 成功logo -->
<view class="success_log">
<image class="logo" src="@/static/images/arenaDetail/pay_success.png" mode="widthFix"></image>
<text>支付成功!</text>
</view>
<!-- 订单信息 -->
<view class="orderInfo">
<view class="order_line" v-for="(item, index) in lineInfo" :key="index">
<text class="left_text">{{ item.title }}</text>
<view class="right_text">{{ item.content }}</view>
</view>
</view>
<!-- 总金额 -->
<view v-if="!isVip" class="total_money">
<text>总支付金额</text>
<text :style="{ color: ThemeColor.PrimaryColor, fontWeight: 700}">¥ 234.83</text>
</view>
<!-- 周卡支付 -->
<view v-else class="total_money">
<text>周卡剩余</text>
<text :style="{color: ThemeColor.PrimaryColor}">5天</text>
</view>
<view v-if="!isVip" class="avg_money">人均费用:¥ 20/人</view>
</view>
</view>
<view class="btn_list">
<MyButton title="查看订单" @comfirn="goRouter" />
<MyButton title="返回首页" :border="true" bgColor="#fff" :color="ThemeColor.PrimaryColor" @comfirn="goRouter" />
</view>
</view>
</template>
<script>
import ThemeColor from '@/utils/themeColor'
import MyButton from '@/components/myButton.vue'
export default {
components: { MyButton },
data() {
return {
ThemeColor,
isVip: false,
lineInfo: [
{ title: '订单流水号:', content: '南宁站 2022-12-26 16:23:45 000026' },
{ title: '参与人数:', content: '8人' },
{ title: '场馆:', content: '彩虹体育馆' },
{ title: '场地:', content: '羽毛球1号场' },
{ title: '预约时间段:', content: '2022-12-26(周一) 15:00-16:00' }
]
}
},
methods: {
goRouter(){
uni.switchTab({
url: '/pages/home/home'
})
}
}
}
</script>
<style lang="scss">
.pay_success{
background-color: #F6F6F6;
box-sizing: border-box;
padding-bottom: 60rpx;
.header_box{
width: 100%;
height: 208rpx;
background: linear-gradient( 270deg, #FCD723 0%, $uni-color-primary 100%);
}
.content_box{
margin-top: -140rpx;
padding: 0 30rpx;
.dataCard{
position: relative;
padding: 32rpx;
background-color: #fff;
background-blend-mode: soft-light;
background-size: cover;
background-position: center;
// 成功logo
.success_log{
display: flex;
flex-direction: column;
align-items: center;
color: #333;
font-size: 36rpx;
font-weight: 600;
border-bottom: 2rpx dashed rgba(225,225,225,0.7);
padding-bottom: 36rpx;
.logo{
width: 122rpx;
height: 122rpx;
margin-bottom: 20rpx;
}
}
// 订单信息
.orderInfo{
height: 468rpx;
background: #FFFFFF;
border-radius: 12rpx;
box-sizing: border-box;
border-bottom: 2rpx dashed rgba(225,225,225,0.7);
.order_line{
display: flex;
align-items: center;
height: 90rpx;
font-size: 26rpx;
.left_text{
color: #666;
margin-right: 6rpx;
}
.right_text{
color: #333;
}
}
}
// 总金额
.total_money{
display: flex;
align-items: center;
justify-content: space-between;
font-size: 32rpx;
line-height: 36rpx;
color: #333;
margin: 32rpx 0;
}
// 均额
.avg_money{
text-align: right;
color: #666;
font-size: 24rpx;
line-height: 36rpx;
}
&::before{
content: '';
position: absolute;
top: -20rpx;
left: 0;
width: 100%;
height: 40rpx;
display: block;
background: linear-gradient(-45deg,transparent 33.33%,#fff 33.33%,#fff 66.666%,transparent 66.666%),
linear-gradient(45deg,transparent 33.33%,#fff 33.33%,#fff 66.666%,transparent 66.666%);
background-size: 28rpx 44rpx;
}
&::after{
content: '';
position: absolute;
bottom: -20rpx;
left: 0;
width: 100%;
height: 40rpx;
display: block;
background: linear-gradient(-45deg,transparent 33.33%,#fff 33.33%,#fff 66.666%,transparent 66.666%),
linear-gradient(45deg,transparent 33.33%,#fff 33.33%,#fff 66.666%,transparent 66.666%);
background-size: 28rpx 44rpx;
transform: rotateX(180deg);
}
}
}
.btn_list{
display: flex;
flex-direction: column;
gap: 32rpx;
padding: 0 30rpx;
margin-top: 80rpx;
}
}
</style>