Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
million
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
viitto
million
Commits
dcd3e373
Commit
dcd3e373
authored
Aug 25, 2025
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉百度地图
parent
5e984a34
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
561 additions
and
627 deletions
+561
-627
utils.js
src/boot/utils.js
+1
-1
Map.vue
src/components/car/Map.vue
+125
-131
tripBaiduMap.vue
src/components/common/tripBaiduMap.vue
+286
-276
index.template.html
src/index.template.html
+67
-69
details.vue
src/pages/ScenicSpotTicket/details.vue
+2
-2
orderForm.vue
src/pages/ScenicSpotTicket/orderForm.vue
+0
-2
cityDetail.vue
src/pages/city/cityDetail.vue
+3
-64
detailHotal.vue
src/pages/detailHotal.vue
+2
-2
detailsCar.vue
src/pages/detailsCar.vue
+2
-12
hotelMap.vue
src/pages/hotel/hotelMap.vue
+66
-60
orderForm.vue
src/pages/hotel/orderForm.vue
+1
-2
hotelMap.vue
src/pages/usercenter/order/hotelMap.vue
+2
-2
orderDetail.vue
src/pages/usercenter/order/orderDetail.vue
+2
-2
ticketMap.vue
src/pages/usercenter/order/ticketMap.vue
+2
-2
No files found.
src/boot/utils.js
View file @
dcd3e373
...
...
@@ -25,7 +25,7 @@ Vue.prototype.domainManager = function () {
if
(
domainNameUrl
.
indexOf
(
'oytour'
)
!==
-
1
)
{
domainUrl
=
"http://reborn.oytour.com"
;
}
domainUrl
=
"http://
192.168.5.56
"
;
domainUrl
=
"http://
reborn.oytour.com
"
;
var
obj
=
{
//主地址
DomainUrl
:
domainUrl
,
...
...
src/components/car/Map.vue
View file @
dcd3e373
<
style
scoped
>
.card
{
width
:
100
vm
;
.card
{
width
:
100
vm
;
height
:
320px
;
border
:
1px
solid
#F0EFEF
;
border-radius
:
8px
;}
</
style
>
<
template
>
border-radius
:
8px
;
}
</
style
>
<
template
>
<div>
<div
class=
"card"
:id=
"`baidu-map_$
{center.Id}`">
</div>
</div>
</
template
>
<
script
>
</
template
>
<
script
>
export
default
{
props
:
[
"AddressObj"
],
props
:
[
"AddressObj"
],
data
()
{
return
{
center
:
{
center
:
{
Lng
:
116.294625
,
Lat
:
39.961627
},
...
...
@@ -24,59 +26,39 @@
}
},
watch
:
{
AddressObj
:
{
handler
(
newValue
,
onldValue
)
{
AddressObj
:
{
handler
(
newValue
,
onldValue
)
{
this
.
center
=
newValue
},
deep
:
true
,
immediate
:
true
deep
:
true
,
immediate
:
true
},
keywords
:
{
handler
(
newValue
,
onldValue
)
{
keywords
:
{
handler
(
newValue
,
onldValue
)
{
this
.
getLocalSearch
()
},
}
},
mounted
()
{
this
.
createMap
();
this
.
addMarker
();
this
.
addLabel
()
if
(
this
.
center
.
Range
&&
this
.
center
.
Range
>
0
)
{
this
.
addCircle
()
}
//
this.addMarker();
//
this.addLabel()
// if (this.center.Range && this.center.Range > 0)
{
//
this.addCircle()
//
}
},
methods
:
{
createMap
()
{
if
(
this
.
map
)
{
this
.
map
.
clearOverlays
()
}
let
map
=
new
BMap
.
Map
(
`baidu-map_
${
this
.
center
.
Id
}
`
);
// 创建地图实例
let
point
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
// 创建点坐标
map
.
centerAndZoom
(
point
,
15
);
// 初始化地图,设置中心点坐标和地图级别
map
.
enableScrollWheelZoom
(
true
);
// var scaleCtrl = new BMap.ScaleControl(); // 添加比例尺控件
// map.addControl(scaleCtrl);
// var zoomCtrl = new BMap.ZoomControl(); // 添加缩放控件//开启鼠标滚轮缩放
// map.addControl(zoomCtrl);
var
marker
=
new
BMap
.
Marker
(
point
);
//标记点
// var label = new BMap.Label(this.center.Name, {
// offset: new BMap.Size(0, 28)
// }); //标签
// label.setStyle({
// color: "#FFF",
// fontSize: "10px",
// height: "24px",
// lineHeight: "20px",
// padding: "2px 5px",
// border: "1px solid rgba(230, 0, 0, 0.7)",
// background: "rgba(230, 0, 0, 0.7)",
// fontWeight: "bold",
// transform: 'translateX(-50%)',
// fontFamily: "微软雅黑"
// })
// marker.setLabel(label)
map
.
addOverlay
(
marker
);
this
.
map
=
map
;
// if (this.map) {
// this.map.clearOverlays()
// }
// let map = new BMap.Map(`baidu-map_${this.center.Id}`); // 创建地图实例
// let point = new BMap.Point(this.center.Lng, this.center.Lat); // 创建点坐标
// map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
// map.enableScrollWheelZoom(true);
// var marker = new BMap.Marker(point); //标记点
// map.addOverlay(marker);
// this.map = map;
},
addMarker
()
{
...
...
@@ -94,7 +76,9 @@
});
let
point
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
// 创建点坐标
// 创建标注对象并添加到地图
var
marker
=
new
BMap
.
Marker
(
point
,
{
icon
:
myIcon
});
var
marker
=
new
BMap
.
Marker
(
point
,
{
icon
:
myIcon
});
this
.
map
.
addOverlay
(
marker
);
},
addLabel
()
{
...
...
@@ -118,23 +102,33 @@
borderRadius
:
'3px'
,
});
},
addCircle
()
{
addCircle
()
{
var
mPoint
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
circle
=
new
BMap
.
Circle
(
mPoint
,
this
.
center
.
Range
,{
fillColor
:
"blue"
,
strokeWeight
:
1
,
fillOpacity
:
0.3
,
strokeOpacity
:
0.3
});
var
circle
=
new
BMap
.
Circle
(
mPoint
,
this
.
center
.
Range
,
{
fillColor
:
"blue"
,
strokeWeight
:
1
,
fillOpacity
:
0.3
,
strokeOpacity
:
0.3
});
this
.
map
.
addOverlay
(
circle
);
let
getNeSw
=
circle
.
getBounds
()
var
mPoint1
=
new
BMap
.
Point
(
getNeSw
.
ne
.
lng
,
getNeSw
.
ne
.
lat
)
var
mPoint2
=
new
BMap
.
Point
(
getNeSw
.
sw
.
lng
,
getNeSw
.
sw
.
lat
)
let
points
=
[
mPoint1
,
mPoint2
]
this
.
map
.
centerAndZoom
(
mPoint
,
this
.
map
.
getViewport
(
points
).
zoom
+
1
);
var
mPoint1
=
new
BMap
.
Point
(
getNeSw
.
ne
.
lng
,
getNeSw
.
ne
.
lat
)
var
mPoint2
=
new
BMap
.
Point
(
getNeSw
.
sw
.
lng
,
getNeSw
.
sw
.
lat
)
let
points
=
[
mPoint1
,
mPoint2
]
this
.
map
.
centerAndZoom
(
mPoint
,
this
.
map
.
getViewport
(
points
).
zoom
+
1
);
},
getLocalSearch
()
{
getLocalSearch
()
{
var
mPoint
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
local
=
new
BMap
.
LocalSearch
(
this
.
map
,
{
renderOptions
:
{
map
:
this
.
map
,
autoViewport
:
false
}});
local
.
searchNearby
(
this
.
keywords
,
mPoint
,
this
.
center
.
Range
);
var
local
=
new
BMap
.
LocalSearch
(
this
.
map
,
{
renderOptions
:
{
map
:
this
.
map
,
autoViewport
:
false
}
});
local
.
searchNearby
(
this
.
keywords
,
mPoint
,
this
.
center
.
Range
);
},
},
}
</
script
>
</
script
>
src/components/common/tripBaiduMap.vue
View file @
dcd3e373
...
...
@@ -26,15 +26,19 @@
position
:
relative
;
bottom
:
-200px
;
}
.BMap_cpyCtrl
{
display
:
none
;
}
.anchorBL
{
display
:
none
;
}
.BMap_bubble_pop
img
{
.BMap_bubble_pop
img
{
display
:
none
!important
;
}
</
style
>
<
template
>
...
...
@@ -47,8 +51,7 @@
props
:
[
"locationArray"
,
"type"
],
data
()
{
return
{
// directions: new google.maps.DirectionsService(), //获取路线请求的服务
// renderer: new google.maps.DirectionsRenderer(), //
polyline
:
{},
//线路
map
:
{},
icons
:
{
...
...
@@ -75,46 +78,46 @@
this
.
mapBuild
()
//初始化实例之后调用
},
methods
:
{
mapBuild
()
{
let
Bmap
=
window
.
BMapGL
this
.
markerArray
=
[];
if
(
this
.
locationArray
&&
this
.
locationArray
.
length
>
0
)
{
let
points
=
[]
this
.
locationArray
.
forEach
(
x
=>
{
if
(
x
.
lng
!=
''
&&
x
.
lat
!=
''
)
{
points
.
push
(
new
Bmap
.
Point
(
x
.
lng
,
x
.
lat
))
}
mapBuild
()
{
//
let Bmap = window.BMapGL
//
this.markerArray = [];
//
if (this.locationArray && this.locationArray.length > 0) {
// let points =
[]
// this.locationArray.forEach(x =>
{
// if (x.lng != '' && x.lat != '')
{
// points.push(new Bmap.Point(x.lng,
x.lat))
//
}
})
var
b
=
new
Bmap
.
Map
(
'map_canvas'
)
this
.
map
=
b
let
view
=
b
.
getViewport
(
points
)
b
.
centerAndZoom
(
view
.
center
,
view
.
zoom
)
b
.
enableScrollWheelZoom
(
true
)
let
allPoints
=
[];
//去掉重复的数据
this
.
locationArray
.
forEach
((
x
,
index
)
=>
{
if
(
x
.
lat
&&
x
.
lng
)
{
let
obj
=
{
location
:
x
.
lat
+
','
+
x
.
lng
,
type
:
x
.
type
,
name
:
x
.
name
,
isFly
:
x
.
isFly
,
trafficType
:
x
.
trafficType
}
if
(
this
.
type
==
1
)
{
if
(
!
this
.
checkItemIsExists
(
allPoints
,
obj
))
{
allPoints
.
push
(
obj
);
}
}
else
{
if
(
!
this
.
checkItemIsExists
(
allPoints
,
obj
,
2
))
{
allPoints
.
push
(
obj
);
}
}
}
});
this
.
calcRoute
(
allPoints
)
}
//
})
//
var b = new Bmap.Map('map_canvas')
//
this.map = b
//
let view = b.getViewport(points)
//
b.centerAndZoom(view.center, view.zoom)
//
b.enableScrollWheelZoom(true)
//
let allPoints = [];
//
//去掉重复的数据
//
this.locationArray.forEach((x, index) => {
//
if (x.lat && x.lng) {
//
let obj = {
//
location: x.lat + ',' + x.lng,
//
type: x.type,
//
name: x.name,
//
isFly: x.isFly,
//
trafficType: x.trafficType
//
}
//
if (this.type == 1) {
//
if (!this.checkItemIsExists(allPoints, obj)) {
//
allPoints.push(obj);
//
}
//
} else {
//
if (!this.checkItemIsExists(allPoints, obj, 2)) {
//
allPoints.push(obj);
//
}
//
}
//
}
//
});
//
this.calcRoute(allPoints)
//
}
},
checkItemIsExists
(
arr
,
checkItem
,
type
)
{
...
...
@@ -135,13 +138,17 @@
},
//画驾车路线图
drawDrivingRute
(
array
)
{
let
points
=
[]
let
points
=
[]
let
Bmap
=
window
.
BMapGL
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
var
form_loc
=
array
[
i
].
location
.
split
(
','
);
points
.
push
(
new
Bmap
.
Point
(
form_loc
[
1
],
form_loc
[
0
]))
points
.
push
(
new
Bmap
.
Point
(
form_loc
[
1
],
form_loc
[
0
]))
}
var
polyline
=
new
BMapGL
.
Polyline
(
points
,
{
strokeColor
:
"black"
,
strokeWeight
:
2
,
strokeOpacity
:
0.5
});
var
polyline
=
new
BMapGL
.
Polyline
(
points
,
{
strokeColor
:
"black"
,
strokeWeight
:
2
,
strokeOpacity
:
0.5
});
this
.
map
.
addOverlay
(
polyline
);
},
calcRoute
:
function
(
waypoints
)
{
...
...
@@ -223,7 +230,9 @@
}
}
var
myIcon
=
new
BMapGL
.
Icon
(
image
.
url
,
image
.
scaledSize
)
var
marker
=
new
BMapGL
.
Marker
(
new
BMapGL
.
Point
(
loc
[
1
],
loc
[
0
]),{
icon
:
myIcon
});
// 将图标和坐标进行关联
var
marker
=
new
BMapGL
.
Marker
(
new
BMapGL
.
Point
(
loc
[
1
],
loc
[
0
]),
{
icon
:
myIcon
});
// 将图标和坐标进行关联
this
.
map
.
addOverlay
(
marker
);
// 将关联好的结果进行放置
var
opts
=
{
position
:
new
BMapGL
.
Point
(
loc
[
1
],
loc
[
0
]),
// 指定文本标注所在的地理位置
...
...
@@ -239,7 +248,7 @@
height
:
'19px'
,
textAlign
:
'center'
,
lineHeight
:
'20px'
,
border
:
'none'
border
:
'none'
});
// 自定义文本标注样式
this
.
map
.
addOverlay
(
label
);
//景点
...
...
@@ -249,9 +258,9 @@
str
+=
'<br/><div>'
+
distance
+
'KM<div>'
}
var
infoWindow
=
new
BMapGL
.
InfoWindow
(
str
,
{
// 创建信息窗口对象
width
:
50
,
// 信息窗口宽度
width
:
50
,
// 信息窗口宽度
})
marker
.
addEventListener
(
"click"
,
function
(){
// 创建点击事件
marker
.
addEventListener
(
"click"
,
function
()
{
// 创建点击事件
this
.
map
.
openInfoWindow
(
infoWindow
,
opts
.
position
);
//开启信息窗口
});
...
...
@@ -259,7 +268,7 @@
if
(
type
==
3
||
type
==
2
||
isFly
==
1
)
{
label
.
setContent
(
''
)
label
.
setStyle
({
background
:
'transparent'
background
:
'transparent'
})
}
...
...
@@ -276,10 +285,10 @@
var
s
=
2
*
Math
.
asin
(
Math
.
sqrt
(
Math
.
pow
(
Math
.
sin
(
a
/
2
),
2
)
+
Math
.
cos
(
radLat1
)
*
Math
.
cos
(
radLat2
)
*
Math
.
pow
(
Math
.
sin
(
b
/
2
),
2
)));
s
=
s
*
EARTH_RADIUS
;
s
=
Math
.
round
(
s
*
10000
)
/
10000.0
/
1000.0
;
s
=
Math
.
round
(
s
*
10000
)
/
10000.0
/
1000.0
;
return
Math
.
round
(
s
);
},
convertPointer
(
ggPoint
,
cb
)
{
convertPointer
(
ggPoint
,
cb
)
{
let
BMap
=
window
.
BMapGL
var
convertor
=
new
BMap
.
Convertor
();
var
pointArr
=
[];
...
...
@@ -288,4 +297,5 @@
}
},
}
</
script
>
src/index.template.html
View file @
dcd3e373
...
...
@@ -10,38 +10,35 @@
<meta
name=
"description"
content=
"<%= htmlWebpackPlugin.options.productDescription %>"
>
<meta
name=
"format-detection"
content=
"telephone=no"
>
<meta
name=
"msapplication-tap-highlight"
content=
"no"
>
<meta
name=
"viewport"
content=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
>
<meta
name=
"viewport"
content=
"user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (htmlWebpackPlugin.options.ctx.mode.cordova || htmlWebpackPlugin.options.ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"128x128"
href=
"statics/icons/favicon-128x128.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"96x96"
href=
"statics/icons/favicon-96x96.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"32x32"
href=
"statics/icons/favicon-32x32.png"
>
<link
rel=
"icon"
type=
"image/png"
sizes=
"16x16"
href=
"statics/icons/favicon-16x16.png"
>
<link
rel=
"icon"
type=
"image/ico"
href=
"statics/icons/favicon.ico"
>
<!-- <script async defer crossorigin="anonymous" src="https://connect.facebook.net/zh_CN/sdk.js#xfbml=1&version=v7.0" nonce="bDrSmWhp"></script> -->
<!-- <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc"></script> -->
<!--HK 2024-08-15 新加(避免提示为商用授权) Start-->
<script
type=
"text/javascript"
src=
"//api.map.baidu.com/api?key=&v=1.1&services=true&s=1"
></script>
<script
type=
"text/javascript"
src=
"https://api.map.baidu.com/getscript?v=2.0&ak=&services=&t=20240731110958"
></script>
<!--
<script charset="utf8" src="https://dlswbr.baidu.com/heicha/mw/abclite-2063-s.original.js?_=9975"></script>
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=1.1&ak=&services=true&t=20130716024058"></script>
<script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&s=1"></script>
-->
<!-- <script type="text/javascript" src="//api.map.baidu.com/api?key=&v=1.1&services=true&s=1"></script>
<script type="text/javascript" src="https://api.map.baidu.com/getscript?v=2.0&ak=&services=&t=20240731110958">
</script> -->
<!--HK 2024-08-15 新加 End -->
<script
src=
"http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"
></script>
<script>
function
countryCb
(
r
)
{
if
(
!
r
)
{
loadScriptString
(
'https://maps.googleapis.com/maps/api/js?key=AIzaSyCvRZN9lGl3y3EsM0A0sWPf1pZ2olGsyNg&callback=Function.prototype'
)
loadScriptString
(
'https://maps.googleapis.com/maps/api/js?key=AIzaSyCvRZN9lGl3y3EsM0A0sWPf1pZ2olGsyNg&callback=Function.prototype'
)
setTimeout
(()
=>
{
loadScriptString
(
'https://vt-im-bucket.oss-cn-chengdu.aliyuncs.com/1.0.0.1/mark.js'
)
},
1000
);
}
else
{
// loadScriptString('https://api.map.baidu.com/api?type=webgl&v=3.0&ak=L5Qw0GlbbCIMwgR4Uug3ogM40Imkd3CV')
}
}
function
loadScriptString
(
code
)
{
...
...
@@ -57,7 +54,7 @@
var
xhr
=
new
XMLHttpRequest
();
var
called
=
false
;
xhr
.
open
(
'GET'
,
url
);
xhr
.
onreadystatechange
=
function
()
{
xhr
.
onreadystatechange
=
function
()
{
if
(
xhr
.
readyState
===
4
&&
xhr
.
status
===
200
)
{
called
=
true
;
that
.
countryCb
(
false
);
...
...
@@ -65,16 +62,17 @@
};
xhr
.
send
();
// timeout 1s, this facebook API is very fast.
setTimeout
(
function
()
{
setTimeout
(
function
()
{
if
(
!
called
)
{
xhr
.
abort
();
that
.
countryCb
(
true
);
}
},
1000
);
}
window
.
onload
=
function
()
{
window
.
onload
=
function
()
{
isInChina
()
}
</script>
</head>
...
...
src/pages/ScenicSpotTicket/details.vue
View file @
dcd3e373
...
...
@@ -446,8 +446,8 @@
<
div
class
=
"q-pa-md"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
<
componentsMap
v
-
if
=
"AddressObj.Lng&&AddressObj.Lat"
:
AddressObj
=
"AddressObj"
/
>
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div
>
<
!--
<
componentsMap
v
-
if
=
"AddressObj.Lng&&AddressObj.Lat"
:
AddressObj
=
"AddressObj"
/>
--
>
<
!--
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div> --
>
<
/div
>
<
/div
>
<
div
...
...
src/pages/ScenicSpotTicket/orderForm.vue
View file @
dcd3e373
...
...
@@ -348,11 +348,9 @@
import
{
json
}
from
"body-parser"
;
import
coupon
from
'src/components/common/coupon.vue'
import
ProductTypeEnum
from
"src/utils/producttypeenum"
;
import
componentsMap
from
"src/components/car/Map.vue"
;
export
default
{
components
:{
coupon
,
componentsMap
,
NoneData
,
auth
},
...
...
src/pages/city/cityDetail.vue
View file @
dcd3e373
...
...
@@ -299,58 +299,7 @@
</div>
</div>
<city-info
:city=
"detail"
></city-info>
<!-- <div class="top-title">關於{{detail.AreaName}}</div>
<div class="flex justify-between">
<div style="width: 720px">
{{detail.Introduction}}
</div>
<div>
<div id="baidu-map"></div>
</div>
</div>
<div class="mt pt">
<div class="flex mt">
<div class="flex items-center time-item">
<img
class="info-icon"
:src="require(`../../assets/img/info-time.png`)"
/>
<div>
<div class="f16 bold">時區 {{detail.TimeZones}}</div>
</div>
</div>
<div class="flex items-center time-item">
<img
class="info-icon"
:src="require('../../assets/img/info-currency.png')"
/>
<div>
<div class="f16 bold">貨幣 {{detail.CurrencyName}}</div>
</div>
</div>
<div class="flex items-center time-item">
<img
class="info-icon"
:src="require(`../../assets/img/info-ele.png`)"
/>
<div>
<div class="f16 bold">電壓 {{detail.Voltage}}</div>
</div>
</div>
<div class="flex time-item">
<img
class="info-icon"
:src="require(`../../assets/img/info-time.png`)"
/>
<div>
<div class="f16 bold q-mt-xs">旅遊時間</div>
<div v-for="(item, index) in detail.BestTravelTimeList" :key="index">
<span class="bold">{{item.Month}}</span><span class="q-ml-sm ">{{item.Description}}</span>
</div>
</div>
</div>
</div>
</div> -->
<nearCity
:name=
"detail.AreaName"
:cityList=
"detail.AdjacentCityList"
/>
<q-dialog
v-model=
"show"
>
<div
style=
"width: 900px"
>
...
...
@@ -463,12 +412,7 @@ export default {
);
},
createMap
()
{
// let map = new BMapGL.Map("baidu-map"); // 创建地图实例
// this.map = map;
// let pointA = new BMapGL.Point(this.detail.Lng, this.detail.Lat); // 创建点坐标
// map.centerAndZoom(pointA, 8); // 初始化地图,设置中心点坐标和地图级别
// this.addMarker();
// this.addLabel()
},
addMarker
()
{
let
icon
=
require
(
`../../assets/img/marker.png`
);
...
...
@@ -510,12 +454,7 @@ export default {
});
},
createTopMap
()
{
// let map = new BMapGL.Map("map"); // 创建地图实例
// this.topMap = map;
// let pointA = new BMapGL.Point(this.detail.Lng, this.detail.Lat); // 创建点坐标
// map.centerAndZoom(pointA, 8); // 初始化地图,设置中心点坐标和地图级别
// this.addTopMarker()
// this.addTopLabel()
},
addTopMarker
()
{
let
icon
=
require
(
`../../assets/img/marker.png`
);
...
...
src/pages/detailHotal.vue
View file @
dcd3e373
...
...
@@ -726,8 +726,8 @@
<div
class=
"text-grey-9"
>
地址:{{`${hotelSummary.address}`}}
</div>
</div>
<div
class=
"q-pa-md"
v-for=
"(x,index) in travelLngLat"
:key=
"index"
>
<componentsMap
v-if=
"x.Lng&&x.Lat"
:AddressObj=
"x"
/>
<div
v-else
class=
"card text-center"
>
经纬度未知
</div>
<
!-- <
componentsMap v-if="x.Lng&&x.Lat" :AddressObj="x"/>
<div v-else class="card text-center">经纬度未知</div>
-->
</div>
</div>
<div
...
...
src/pages/detailsCar.vue
View file @
dcd3e373
...
...
@@ -463,7 +463,7 @@
<div
class=
"q-pa-md"
:class=
"
{
'q-mx-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
<
componentsMap
:AddressObj=
"x"
/
>
<
!--
<componentsMap
:AddressObj=
"x"
/>
--
>
</div>
</div>
<div
...
...
@@ -489,7 +489,7 @@
<div
class=
"q-pa-md"
:class=
"
{
'q-mx-md': $q.screen.width
<
1220
&&
$
q
.
platform
.
is
.
mobile
,
}"
>
<
componentsMap
:AddressObj=
"x"
/
>
<
!--
<componentsMap
:AddressObj=
"x"
/>
--
>
</div>
</div>
<div
...
...
@@ -569,32 +569,22 @@
</div>
</
template
>
</div>
<!-- <auth></auth> -->
</div>
</template>
<
script
>
// import auth from "src/components/common/auth.vue";
import
{
slider
,
slideritem
}
from
"vue-concise-slider"
;
import
calendar
from
"../components/trip/calendar.vue"
;
import
OrderPreview
from
"src/components/car/orderPreview.vue"
;
// import smaple from "src/components/trip/smaple.vue";
// import Trip from "src/components/trip/trip.vue";
// import block from "src/components/trip/block/index";
import
{
date
}
from
"quasar"
;
import
componentsMap
from
"../components/car/Map.vue"
;
// import * as dayjs from "dayjs";
export
default
{
components
:
{
slider
,
slideritem
,
calendar
,
OrderPreview
,
// smaple,
// Trip,
// block,
componentsMap
,
// auth,
},
props
:
[],
data
()
{
...
...
src/pages/hotel/hotelMap.vue
View file @
dcd3e373
<
style
scoped
>
.card
{
width
:
380px
;
height
:
139px
;
border
:
1px
solid
#F0EFEF
;
border-radius
:
8px
;
}
.card
{
width
:
380px
;
height
:
139px
;
border
:
1px
solid
#F0EFEF
;
border-radius
:
8px
;}
</
style
>
<
template
>
<div
class=
"card"
id=
"baidu-map"
></div>
</
template
>
<
script
>
export
default
{
export
default
{
data
()
{
return
{}
},
mounted
()
{
},
mounted
()
{
this
.
createMap
();
this
.
addMarker
();
this
.
addLabel
()
//
this.addMarker();
//
this.addLabel()
},
methods
:
{
createMap
()
{
if
(
this
.
map
)
{
this
.
map
.
clearOverlays
()
}
let
map
=
new
BMap
.
Map
(
"baidu-map"
);
// 创建地图实例
let
point
=
new
BMapGL
.
Point
(
116.404
,
39.915
);
// 创建点坐标
map
.
centerAndZoom
(
point
,
15
);
// 初始化地图,设置中心点坐标和地图级别
var
marker
=
new
BMap
.
Marker
(
point
);
//标记点
map
.
addOverlay
(
marker
);
this
.
map
=
map
;
//
if (this.map) {
//
this.map.clearOverlays()
//
}
//
let map = new BMap.Map("baidu-map"); // 创建地图实例
//
let point = new BMapGL.Point(116.404, 39.915); // 创建点坐标
//
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
//
var marker = new BMap.Marker(point); //标记点
//
map.addOverlay(marker);
//
this.map = map;
},
addMarker
()
{
let
icon
=
require
(
`../../assets/img/info-time.png`
);
...
...
@@ -44,7 +47,9 @@ export default {
});
let
point
=
new
BMapGL
.
Point
(
116.404
,
39.915
);
// 创建点坐标
// 创建标注对象并添加到地图
var
marker
=
new
BMapGL
.
Marker
(
point
,
{
icon
:
myIcon
});
var
marker
=
new
BMapGL
.
Marker
(
point
,
{
icon
:
myIcon
});
this
.
map
.
addOverlay
(
marker
);
},
addLabel
()
{
...
...
@@ -67,5 +72,6 @@ export default {
});
},
},
}
}
</
script
>
src/pages/hotel/orderForm.vue
View file @
dcd3e373
...
...
@@ -403,11 +403,10 @@ import { date } from 'quasar'
import
{
json
}
from
"body-parser"
;
import
coupon
from
'src/components/common/coupon.vue'
import
ProductTypeEnum
from
"src/utils/producttypeenum"
;
import
componentsMap
from
"src/components/car/Map.vue"
;
export
default
{
components
:{
coupon
,
componentsMap
,
NoneData
,
auth
},
...
...
src/pages/usercenter/order/hotelMap.vue
View file @
dcd3e373
...
...
@@ -25,8 +25,8 @@
<
div
class
=
"q-pa-md"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
v
-
for
=
"(x,index) in travelLngLat"
:
key
=
"index"
>
<
componentsMap
v
-
if
=
"x.Lng&&x.Lat"
:
AddressObj
=
"x"
/>
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div
>
<
!--
<
componentsMap
v
-
if
=
"x.Lng&&x.Lat"
:
AddressObj
=
"x"
/>
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div>
--
>
<
/div
>
<
/div></
div
>
<
/template
>
...
...
src/pages/usercenter/order/orderDetail.vue
View file @
dcd3e373
...
...
@@ -121,7 +121,7 @@
<
script
>
import
noneData
from
'src/components/common/noneData.vue'
import
componentsMap
from
"../../../components/car/Map.vue"
;
import
carPriceDetail
from
'./carPriceDetail.vue'
import
groupPriceDetail
from
'./groupPriceDetail.vue'
import
hotelPriceDetail
from
'./hotelPriceDetail.vue'
...
...
@@ -131,7 +131,7 @@ import groupMap from './groupMap.vue'
import
hotelMap
from
'./hotelMap.vue'
import
ticketMap
from
'./ticketMap.vue'
export
default
{
components
:
{
noneData
,
componentsMap
,
carPriceDetail
,
groupPriceDetail
,
hotelPriceDetail
,
ticketPriceDetail
,
carMap
,
groupMap
,
hotelMap
,
ticketMap
},
components
:
{
noneData
,
carPriceDetail
,
groupPriceDetail
,
hotelPriceDetail
,
ticketPriceDetail
,
carMap
,
groupMap
,
hotelMap
,
ticketMap
},
// GoodsType: this.productType,//商品类型(见枚举) 12包车 13 接机 14送机
data
()
{
return
{
...
...
src/pages/usercenter/order/ticketMap.vue
View file @
dcd3e373
...
...
@@ -25,8 +25,8 @@
<
div
class
=
"q-pa-md"
:
class
=
"{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}
"
>
<
componentsMap
v
-
if
=
"AddressObj.Lng&&AddressObj.Lat"
:
AddressObj
=
"AddressObj"
/>
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div
>
<
!--
<
componentsMap
v
-
if
=
"AddressObj.Lng&&AddressObj.Lat"
:
AddressObj
=
"AddressObj"
/>
<
div
v
-
else
class
=
"card text-center"
>
经纬度未知
<
/div>
--
>
<
/div
>
<
/div></
div
>
<
/template
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment