6e9a3492
刘淇
江阴支付
|
1
|
<template>
|
eae77c58
刘淇
江阴领取优惠券
|
2
|
<div>
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
3
|
<img :src="imgurl" alt="" style="margin: 10px auto;width: 64px;height: 64px;">
|
eae77c58
刘淇
江阴领取优惠券
|
4
|
<div style="padding: 10px 30px 50px">
|
331018f3
刘淇
江阴领取优惠券调接口
|
5
|
<p>尊敬的车主您好:{{ tipText }}</p>
|
eae77c58
刘淇
江阴领取优惠券
|
6
|
</div>
|
6e9a3492
刘淇
江阴支付
|
7
|
<div style="padding: 0 20px">
|
7e244ba4
刘淇
领取优惠券
|
8
|
<mt-button size="large" type="primary" @click="toPay" style="margin-bottom: 20px;" v-show="payFlag">去支付停车费用
|
331018f3
刘淇
江阴领取优惠券调接口
|
9
|
</mt-button>
|
6e9a3492
刘淇
江阴支付
|
10
11
12
|
<mt-button size="large" type="danger" @click="toBackPage">返回</mt-button>
</div>
|
eae77c58
刘淇
江阴领取优惠券
|
13
|
</div>
|
6e9a3492
刘淇
江阴支付
|
14
15
16
|
</template>
<script>
|
eae77c58
刘淇
江阴领取优惠券
|
17
18
|
|
331018f3
刘淇
江阴领取优惠券调接口
|
19
20
21
22
23
24
|
import {
scanCouponQR,
queryParkingRecordPageByCarNumbers,
appApplyParkOut,
parkingQuery
} from '@/api/couponPay/couponPay.js'
|
eae77c58
刘淇
江阴领取优惠券
|
25
|
|
6e9a3492
刘淇
江阴支付
|
26
27
|
export default {
name: "coupon",
|
eae77c58
刘淇
江阴领取优惠券
|
28
29
|
data() {
return {
|
331018f3
刘淇
江阴领取优惠券调接口
|
30
|
imgurl: '',
|
eae77c58
刘淇
江阴领取优惠券
|
31
32
|
successiconUrl: require('../../assets/images/successIcon.png'),
loseiconUrl: require('../../assets/images/loseIcon.png'),
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
33
34
|
carNum: '',
carNumberColor: '',
|
331018f3
刘淇
江阴领取优惠券调接口
|
35
36
37
38
|
parkingData: [],
carType: '',
codeType: '',
tipText: '',
|
7e244ba4
刘淇
领取优惠券
|
39
|
payFlag: true,
|
6e9a3492
刘淇
江阴支付
|
40
41
|
}
},
|
eae77c58
刘淇
江阴领取优惠券
|
42
|
created() {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
43
44
45
|
this.carNum = this.$route.query.carNumber
this.carType = this.$route.query.carType
this.codeType = this.$route.query.codeType
|
331018f3
刘淇
江阴领取优惠券调接口
|
46
|
this.cardRelParkNo = this.$route.query.cardRelParkNo
|
eae77c58
刘淇
江阴领取优惠券
|
47
48
49
50
51
52
53
54
|
// this.carNum = this.$route.query.carNumber // 获取车牌号
// this.carNumberColor = this.$route.query.carNumberColor // 获取颜色 0:蓝牌;1:黄牌;2:白牌;3:黑牌;4:绿色
// this.currentTabActive = this.$route.query.parkFlag ? this.$route.query.parkFlag : 0
// console.log(this.currentTabActive)
// console.log(this.carNumber)
this.scanCouponQR()
},
methods: {
|
331018f3
刘淇
江阴领取优惠券调接口
|
55
56
57
58
|
scanCouponQR() {
let url = process.env.VUE_APP_API;
console.log(url)
|
eae77c58
刘淇
江阴领取优惠券
|
59
60
61
62
63
64
|
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
|
331018f3
刘淇
江阴领取优惠券调接口
|
65
66
67
68
|
carType: '2',
codeType: this.codeType,
cardRelParkNo: this.cardRelParkNo,
key: this.$route.query.key,
|
eae77c58
刘淇
江阴领取优惠券
|
69
70
71
|
carNum: this.carNum,
// carNumberColor: this.carNumberColor,
orgId: this.$utils.myOrgId,
|
331018f3
刘淇
江阴领取优惠券调接口
|
72
|
terminalSource: '7',
|
eae77c58
刘淇
江阴领取优惠券
|
73
74
75
|
// token:'e2c1e43722dd43a5b7e268001b39e6f0'
}
jsondata.sign = this.$utils.signObject(jsondata)
|
7e244ba4
刘淇
领取优惠券
|
76
|
console.log(jsondata)
|
331018f3
刘淇
江阴领取优惠券调接口
|
77
|
scanCouponQR(url,jsondata).then(response => {
|
eae77c58
刘淇
江阴领取优惠券
|
78
|
console.log(response)
|
331018f3
刘淇
江阴领取优惠券调接口
|
79
80
|
if (response.code == 0) {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
81
82
|
this.payFlag = true
this.imgurl = this.successiconUrl
|
331018f3
刘淇
江阴领取优惠券调接口
|
83
84
|
this.tipText = '领取优惠券成功'
} else {
|
7e244ba4
刘淇
领取优惠券
|
85
|
this.payFlag = true
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
86
|
this.imgurl = this.loseiconUrl
|
331018f3
刘淇
江阴领取优惠券调接口
|
87
|
this.tipText = response.message
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
88
|
}
|
331018f3
刘淇
江阴领取优惠券调接口
|
89
|
// this.tipText =
|
eae77c58
刘淇
江阴领取优惠券
|
90
91
92
|
})
},
toPay() {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
93
94
95
96
|
this.parkRecordList()
// this.$router.push({
// path: 'couponPay'
// })
|
6e9a3492
刘淇
江阴支付
|
97
|
},
|
eae77c58
刘淇
江阴领取优惠券
|
98
|
toBackPage() {
|
6e9a3492
刘淇
江阴支付
|
99
|
this.$router.back()
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
100
101
|
},
parkRecordList() { // 获取停车记录数据
|
331018f3
刘淇
江阴领取优惠券调接口
|
102
|
let url = process.env.VUE_APP_PAYAPI;
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
pageNum: '1',
pageSize: '1000',
parkState: '10',
terminalSource: '3',
// parkState:'10',
carNumber: this.carNum,
// carNumberColor: '1',
orgId: this.$utils.myOrgId,
}
jsondata.sign = this.$utils.signObject(jsondata)
|
7e244ba4
刘淇
领取优惠券
|
121
|
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
122
123
|
// jsondata.sign = md5sign
console.log('停车记录传参 ' + JSON.stringify(jsondata));
|
331018f3
刘淇
江阴领取优惠券调接口
|
124
|
queryParkingRecordPageByCarNumbers(url,jsondata).then(response => {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
125
126
127
128
129
130
131
132
133
134
135
136
|
console.log(response)
// this.parkList = response.data.dataList
this.parkingData = response.data.dataList.filter(item => {
return item.parkState == '10'
})
console.log(this.parkingData)
this.toPayCurrent(this.parkingData)
})
},
toPayCurrent(i) { // 缴纳本次在停费用
|
331018f3
刘淇
江阴领取优惠券调接口
|
137
|
let url = process.env.VUE_APP_PAYAPI;
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
138
139
140
141
142
143
144
145
146
147
148
|
var salt = this.$utils.myCommonSalt(32);
var params = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
orderId: i[0].orderId,
payOrderType: '101',
terminalSource: '3',
}
params.sign = this.$utils.signObject(params)
|
331018f3
刘淇
江阴领取优惠券调接口
|
149
|
appApplyParkOut(url,params).then(response => {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
console.log(response)
if (response.code == '5005') {
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
payType: this.$utils.clientBrowsePayType(),
appId: this.$utils.myVxAppId,
orderId: i[0].orderId,
terminalSource: '7',
parkCode: i[0].parkCode,
carNumber: this.carNum,
}
jsondata.sign = this.$utils.signObject(jsondata)
|
331018f3
刘淇
江阴领取优惠券调接口
|
167
|
parkingQuery(url,jsondata).then(result => {
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
168
169
170
171
|
console.log(result)
let res = result.data
let _dis = res.discountFee
let discountFee = _dis.slice(1, _dis.length - 1)
|
331018f3
刘淇
江阴领取优惠券调接口
|
172
173
174
175
176
177
178
179
180
181
182
183
184
|
sessionStorage.setItem('couponPark', JSON.stringify(result.data))
this.$router.push(
{
path: 'couponPay',
query: {
carColor: this.carColor,// 车牌颜色
arrearageTotalFee: res.orderTotalFee,// 应收
arrearageDiscFee: discountFee * 100,// 优惠
arrearageActFee: res.orderFee,// 实收
carNumber: this.carNumber, // 车牌
paySrcType: 101, //支付的类型 101 是本次 103是历史欠费
ordeID: i.orderId, //支付的订单号
appOrderTimeout: res.appOrderTimeout, // 超时描述
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
185
|
}
|
331018f3
刘淇
江阴领取优惠券调接口
|
186
187
|
}
)
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
188
189
|
})
|
331018f3
刘淇
江阴领取优惠券调接口
|
190
191
192
193
|
} else {
//$('.dialog-out').show()
this.$msgbox('提示', '停车15分钟内无需缴费,申请成功。')
}
|
92e91fa6
刘淇
江阴领取优惠券调接口
|
194
195
196
197
|
})
},
|
6e9a3492
刘淇
江阴支付
|
198
199
200
201
202
203
204
|
}
};
</script>
<style scoped>
</style>
|