coupon.vue
2.11 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
<template>
<div>
<img :src="successiconUrl" alt="" style="margin: 10px auto;width: 64px;height: 64px;">
<div style="padding: 10px 30px 50px">
<p>尊敬的车主您好:</p>
<p>尊敬的车主您好:</p>
<p>尊敬的车主您好:</p>
</div>
<div style="padding: 0 20px">
<mt-button size="large" type="primary" @click="toPay" style="margin-bottom: 20px;">去支付</mt-button>
<mt-button size="large" type="danger" @click="toBackPage">返回</mt-button>
</div>
</div>
</template>
<script>
import { scanCouponQR } from '@/api/couponPay/couponPay.js'
export default {
name: "coupon",
data() {
return {
successiconUrl: require('../../assets/images/successIcon.png'),
loseiconUrl: require('../../assets/images/loseIcon.png'),
carNum: '苏BB210V',
carNumberColor: ''
}
},
created() {
// 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: {
scanCouponQR(){
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
carType:'02',
codeType:'2',
cardRelParkNo:'123qwe',
key:'1',
carNum: this.carNum,
// carNumberColor: this.carNumberColor,
orgId: this.$utils.myOrgId,
terminalSource:'7',
// token:'e2c1e43722dd43a5b7e268001b39e6f0'
}
jsondata.sign = this.$utils.signObject(jsondata)
console.log(jsondata)
scanCouponQR(jsondata).then(response => {
console.log(response)
})
},
toPay() {
this.$router.push({
path: 'couponPay'
})
},
toBackPage() {
this.$router.back()
}
}
};
</script>
<style scoped>
</style>