endRecharge.vue
3.66 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>
<div>
<div class="car_charge_bg">
</div>
<!--<van-button class="bg_title" type="primary" size="mini">集团车辆点击此处验证</van-button>-->
<van-cell-group>
<van-cell title="充电总费用" value="4.20元" size="large"/>
<van-cell title="充值金额" value="10.00元" size="large"/>
<van-cell title="充电总服务费" value="2.30元" size="large"/>
<van-cell title="剩余金额" value="1.30元" size="large"/>
<van-cell title="充电总时长" value="2小时" size="large"/>
<van-cell title="充电单价" value="1.20元/小时" size="large"/>
<van-cell title="充电服务费" value="0.30元/小时" size="large"/>
<van-cell title="充电平均功率" value="100KW" size="large"/>
<van-cell title="充电编码" value="1011111" label="结束充电后自动退款剩余金额" size="large"/>
</van-cell-group>
<!--<div>-->
<!--<p style="padding-left: 16px;">-->
<!--<!–<span style="font-size: 16px;">请选择充电金额</span>–>-->
<!--<span style="font-size: 14px; color: #999;">充电完成后自动退款剩余金额</span>-->
<!--</p>-->
<!--</div>-->
<!--<van-grid :gutter="16">-->
<!--<van-grid-item v-for="(value, index) in moneyList" :key="value" :text="value+'元'"-->
<!--:class="{'activeColor':index==currentIndex}" @click="moneyChage(index)"/>-->
<!--</van-grid>-->
<div style="padding: 25px 16px">
<van-button type="primary" block>结束充电</van-button>
</div>
</div>
</template>
<script>
import { swiperQuery } from "../api/navigation/navigation";
export default {
name: "endRecharge",
data() {
return {
currentIndex: 0,
moneyList: [
"10", "20", "30", "50", "80", "100", "150", "200"
],
carNumber: "", // 车牌号码
carWrapBG: 0,// 车牌颜色
swiperData: [] // 轮播数据
};
},
mounted() {
this.carNumber = this.$route.query.carNumber; // 车牌号码
this.carWrapBG = this.$route.query.carNumberColor; // 车牌颜色
console.log(this.carNumber);
},
created() {
this.initSWiper();
},
methods: {
moneyChage(_index) {
this.currentIndex = _index;
},
initSWiper() {
var salt = this.$utils.myCommonSalt(32);
var jsondata = {
app_id: this.$utils.myVarAppid,
deviceInfo: this.$utils.myDeviceInfo,
salt: salt,
sign_type: "md5",
sign: "1",
orgId: this.$utils.myOrgId,
jumpType: "8"
};
// jsondata = JSON.stringify(jsondata);
swiperQuery(jsondata).then(res => {
this.swiperData = res.data;
console.log(this.swiperData);
});
},
openImgUrl(i) { // 点击图片跳转
window.open(i.jumpUrl);
},
toPlateNumber() { // 前往输入车牌页面
this.$router.push({
path: "plateNumber"
}
);
},
toParkRecord() { // 前往停车记录页面
this.$router.push({
path: "parkRecord",
query: {
carNumber: this.carNumber,
carNumberColor: this.carWrapBG
}
});
}
}
};
</script>
<style scoped>
.car_charge_bg {
width: 120px;
height: 120px;
margin: 25px auto;
background: url("../assets/images/car.png") no-repeat;
background-size: 100% 100%;
position: relative;
}
.bg_title{
position: absolute;
top:20px;
right: 16px;
}
>>> .van-grid-item__text {
font-size: 18px;
}
.activeColor >>> .van-grid-item__content {
border: 1px solid #01CF97;
}
.activeColor >>> .van-grid-item__text {
color: #01CF97 !important;
}
</style>