orderPay.vue
4.47 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
186
187
188
<template>
<div>
<div class="car-wrap">
<div class="carBG" :class="carWrapBG | formateColor">
<p class="carNumber">{{carNumber}}</p>
<p class="payFee">{{(arrearageActFee/100).toFixed(2)}}元</p>
</div>
</div>
<ul class="fee-wrap">
<li>
<span>待缴金额</span>
<span>{{(arrearageActFee/100).toFixed(2)}}</span>
</li>
<li>
<span>优惠金额</span>
<span>{{(arrearageDiscFee/100).toFixed(2)}}</span>
</li>
<li>
<span>应付金额</span>
<span>{{(arrearageActFee/100).toFixed(2)}}</span>
</li>
</ul>
<div style="padding: 20px 18px">
<div class="toPay" @click="toPay">{{clientBrowser}}支付</div>
</div>
<p class="tip">
温馨提示:
</p>
<p style="color: #666;padding: 0 18px;">
请在支付完成后15分钟内出场,如超出15分钟,会
产生相应费用。
</p>
</div>
</template>
<script>
import { aliPay } from '@/api/orderPay/orderPay'
export default {
name: 'orderPay',
data() {
return {
carWrapBG: 0,
carNumber: '京A12312',
arrearageActFee: 0,
arrearageDiscFee:0,
arrearageActFee:0,
clientBrowser:'', // 客户端
}
},
created() {
this.carWrapBG = this.$route.query.carColor //车牌颜色
this.carNumber = this.$route.query.carNumber
this.arrearageTotalFee = this.$route.query.arrearageTotalFee // 应收
this.arrearageDiscFee = this.$route.query.arrearageDiscFee // 优惠
this.arrearageActFee = this.$route.query.arrearageActFee // 实收
this.clientBrowser = this.$utils.clientBrowser() //支付方式
},
methods:{
toPay(){
if(this.clientBrowser == '支付宝') {
var aliParams = {};
aliParams.orderId = orderID;
aliParams.carNumber = this.carNumber;
aliParams.payType = 1;// 1:支付宝 2:微信 3:银联 10:H5 4微信公众号
aliParams.terminalSource = 7;//请求端来源 1: 任你停 2:pda 3:微信公共号 7:H5扫码 10页面支付
aliParams.paySrcType = _paySrcType;//101停车支付
aliParams.orgId = '10003',
aliParams.backType=2,
// aliParams.recordArreaInfos = JSON.stringify([{
// "orderId": webAppParams.orderId,
// "orderNotPayFee": _mon * 100,
// "parkId": getQueryString(window.location).parkCode
// }]);
aliParams.recordArreaInfos = JSON.stringify(orderID);
}
}
},
filters:{
formateColor(val){
switch (val) {
case '0':
return 'carBlue'
break;
case '1':
return 'carYellow'
break;
case '2':
return 'carGreen'
break;
case '3':
return 'carWhite'
break;
case '4':
return 'carBlack'
break;
}
}
}
}
</script>
<style scoped lang="scss">
.car-wrap {
padding: 7px 7px;
background: #FFF;
}
.carBG {
width: 100%;
height: 130px;
}
.carBlue{
background: url("../assets/images/blueBG.png") no-repeat;
background-size: 100% 100%;
}
.carYellow{
background: url("../assets/images/yellowBG.png") no-repeat;
background-size: 100% 100%;
}
.carGreen{
background: url("../assets/images/greenBG.png") no-repeat;
background-size: 100% 100%;
}
.carWhite{
background: url("../assets/images/whiteBG.png") no-repeat;
background-size: 100% 100%;
}
.carBlack{
background: url("../assets/images/blackBG.png") no-repeat;
background-size: 100% 100%;
}
.carNumber {
padding: 20px 0 10px;
font-size: 30px;
color: #fff;
text-align: center;
}
.payFee {
font-size: 24px;
color: #FF7B7B;
text-align: center;
}
.fee-wrap {
background: #FFF;
padding: 0 18px;
> li {
display: flex;
justify-content: space-between;
height: 30px;
line-height: 30px;
border-bottom: 1px solid #EAEAEA;
&:last-child {
border-bottom: 0;
}
}
}
.toPay {
width: 100%;
height: 44px;
margin: 0 auto;
line-height: 44px;
text-align: center;
background: linear-gradient(180deg, #3885D9 0%, #4194EF 100%);
border-radius: 4px;
border: 1px solid #0D72E2;
font-size: 20px;
color: #FFF;
cursor: pointer;
}
.tip{
padding-left: 40px;
background: url("../assets/images/free-tip.png") no-repeat 18px center;
background-size: 16px 16px;
color: #666;
}
</style>