popComponents.vue
3.22 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
<template>
<mt-popup style="width: 90%;padding: 10px"
v-model="popupFlag"
popup-transition="popup-fade">
<div style="height: 300px;background: #FFF;border-radius: 8px;" @click="togaodec">
<div class="pop-title">
停车诱导
<p><span>{{num}}S</span> 后自动进入导航</p>
</div>
<div class="pop-main">
<p style="text-align: center;padding: 10px 0">{{ parkName }}</p>
<div style="display: flex;height: 90px;">
<p class="main-left"></p>
<p class="main-center">
距您:{{ juli }}km
</p>
<p style="flex: 1;overflow: hidden;text-align: center;font-size: 18px;">
<span style="display: block;padding: 20px 0;color: #0d72e2">{{ idleberths }} </span>
空位
</p>
</div>
</div>
<div style="display: flex;text-align: center;font-size: 16px;margin-top: 15px;">
<div style="flex: 1">
<img src="../../assets/images/map/a4x.png" style="height: 30px;display: inline-block"/>
<div>最优路线</div>
<div>自动选最优</div>
</div>
<div style="flex: 1">
<img src="../../assets/images/map/a5x.png" style="height: 30px;display: inline-block"/>
<div>最优路线</div>
<div>驾车更安全</div>
</div>
<div style="flex: 1">
<img src="../../assets/images/map/a6.png" style="height: 30px;display: inline-block"/>
<div>最优路线</div>
<div>指引好停车</div>
</div>
</div>
</div>
</mt-popup>
</template>
<script>
export default {
name: 'popComponents',
props: [
'popupFlag',
'parkName',
'idleberths',
'juli',
'num',
'latitude',
'longitude'
],
data() {
return{
}
},
created(){
// let me = this
// this.n = 10
// // this.popupVisible = true
// this.setTimeoutTimer = setInterval(function () {
// if(me.n == 0){
// window.location.href = "http://api.map.baidu.com/marker?location="+this.$route.query.latitude+","+this.$route.query.longitude+"&title=目标地址&content="+this.$route.query.name+"&output=html&src=webapp.baidu.openAPIdemo"
// return
// }
// me.n --
// console.log(me.n)
// },1000)
},
methods: {
togaodec: function () {
window.location.href = "http://api.map.baidu.com/marker?location="+this.latitude+","+this.longitude+"&title=目标地址&content="+this.parkName+"&output=html&src=webapp.baidu.openAPIdemo"
},
}
}
</script>
<style scoped lang="scss">
.pop-title {
height: 50px;
line-height: 50px;
text-align: center;
font-size: 18px;
position: relative;
p {
position: absolute;
right: 0;
bottom: 0;
font-size: 12px;
span {
color: #f44336;
}
}
}
.pop-main {
height: 150px;
border: 2px solid #0d72e2;
}
.main-left {
flex: 1;
background: url('../../assets/images/map/a23.png') no-repeat center center;
background-size: 50% 100%;
}
.main-center {
flex: 1;
padding-top: 70px;
background: url('../../assets/images/map/a1x.png') no-repeat center center;
background-size: 50% 60%;
}
</style>