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
b29a2fea
Commit
b29a2fea
authored
Nov 29, 2024
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1e0b3bfa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1124 additions
and
83 deletions
+1124
-83
Map.vue
src/components/car/Map.vue
+40
-21
kkday.vue
src/components/planeticket/kkday.vue
+84
-60
index.template.html
src/index.template.html
+11
-2
planeticketOrder.vue
src/pages/line/planeticketOrder.vue
+983
-0
routes.js
src/router/routes.js
+6
-0
No files found.
src/components/car/Map.vue
View file @
b29a2fea
...
...
@@ -27,6 +27,7 @@
AddressObj
:{
handler
(
newValue
,
onldValue
)
{
this
.
center
=
newValue
console
.
log
(
" this.center"
,
this
.
center
);
},
deep
:
true
,
immediate
:
true
...
...
@@ -47,45 +48,63 @@
},
methods
:
{
createMap
()
{
if
(
!
BMapGL
)
{
return
;
if
(
this
.
map
)
{
this
.
map
.
clearOverlays
()
}
let
map
=
new
BMap
GL
.
Map
(
`baidu-map_
${
this
.
center
.
Id
}
`
);
// 创建地图实例
let
point
=
new
BMap
GL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
// 创建点坐标
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
BMapGL
.
ScaleControl
();
// 添加比例尺控件
map
.
addControl
(
scaleCtrl
);
var
zoomCtrl
=
new
BMapGL
.
ZoomControl
();
// 添加缩放控件//开启鼠标滚轮缩放
map
.
addControl
(
zoomCtrl
);
// 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
;
},
addMarker
()
{
let
icon
=
require
(
`../../assets/img/marker.png`
);
var
myIcon
=
new
BMap
GL
.
Icon
(
icon
,
new
BMapGL
.
Size
(
23
,
25
),
{
var
myIcon
=
new
BMap
.
Icon
(
icon
,
new
BMap
.
Size
(
23
,
25
),
{
// 指定定位位置。
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
// 角各偏移10像素和25像素。您可以看到在本例中该位置即是
// 图标中央下端的尖角位置。
anchor
:
new
BMap
GL
.
Size
(
10
,
25
),
anchor
:
new
BMap
.
Size
(
10
,
25
),
// 设置图片偏移。
// 当您需要从一幅较大的图片中截取某部分作为标注图标时,您
// 需要指定大图的偏移位置,此做法与css sprites技术类似。
// imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移
});
let
point
=
new
BMap
GL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
// 创建点坐标
let
point
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
// 创建点坐标
// 创建标注对象并添加到地图
var
marker
=
new
BMap
GL
.
Marker
(
point
,
{
icon
:
myIcon
});
var
marker
=
new
BMap
.
Marker
(
point
,
{
icon
:
myIcon
});
this
.
map
.
addOverlay
(
marker
);
},
addLabel
()
{
var
point
=
new
BMap
GL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
point
=
new
BMap
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
content
=
this
.
center
.
Address
;
var
label
=
new
BMap
GL
.
Label
(
content
,
{
var
label
=
new
BMap
.
Label
(
content
,
{
// 创建文本标注
position
:
point
,
// 设置标注的地理位置
offset
:
new
BMap
GL
.
Size
(
10
,
-
60
),
// 设置标注的偏移量
offset
:
new
BMap
.
Size
(
10
,
-
60
),
// 设置标注的偏移量
});
this
.
map
.
addOverlay
(
label
);
// 将标注添加到地图中
label
.
addEventListener
(
"click"
,
function
(
e
)
{
...
...
@@ -101,18 +120,18 @@
});
},
addCircle
(){
var
mPoint
=
new
BMap
GL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
circle
=
new
BMap
GL
.
Circle
(
mPoint
,
this
.
center
.
Range
,{
fillColor
:
"blue"
,
strokeWeight
:
1
,
fillOpacity
:
0.3
,
strokeOpacity
:
0.3
});
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
});
this
.
map
.
addOverlay
(
circle
);
let
getNeSw
=
circle
.
getBounds
()
var
mPoint1
=
new
BMap
GL
.
Point
(
getNeSw
.
ne
.
lng
,
getNeSw
.
ne
.
lat
)
var
mPoint2
=
new
BMap
GL
.
Point
(
getNeSw
.
sw
.
lng
,
getNeSw
.
sw
.
lat
)
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
(){
var
mPoint
=
new
BMap
GL
.
Point
(
this
.
center
.
Lng
,
this
.
center
.
Lat
);
var
local
=
new
BMap
GL
.
LocalSearch
(
this
.
map
,
{
renderOptions
:
{
map
:
this
.
map
,
autoViewport
:
false
}});
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
);
},
...
...
src/components/planeticket/kkday.vue
View file @
b29a2fea
...
...
@@ -127,8 +127,8 @@
<
q
-
card
flat
class
=
"rounded-borders q-py-md q-mt-lg"
>
<
div
class
=
"text-subtitle1 text-weight-bold q-mx-md"
>
行程類型
<
/div
>
<
div
class
=
"q-gutter-sm"
style
=
" display: inline-flex; justify-content: space-around;"
>
<
q
-
radio
v
-
model
=
"msg.TicketType"
val
=
"1"
label
=
"往返"
:
dense
=
"true"
style
=
"margin-left:1.5rem;"
/>
<
q
-
radio
v
-
model
=
"msg.TicketType"
val
=
"2"
label
=
"单程"
:
dense
=
"true"
style
=
"margin-left:2rem;"
/>
<
q
-
radio
@
input
=
"handleTicked"
v
-
model
=
"msg.TicketType"
val
=
"1"
label
=
"往返"
:
dense
=
"true"
style
=
"margin-left:1.5rem;"
/>
<
q
-
radio
@
input
=
"handleTicked"
v
-
model
=
"msg.TicketType"
val
=
"2"
label
=
"单程"
:
dense
=
"true"
style
=
"margin-left:2rem;"
/>
<
/div
>
<
/q-card>
...
...
@@ -271,7 +271,7 @@
:
class
=
"$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
v
-
for
=
"(x, i) in DataList"
:
key
=
"i"
>
<
template
v
-
if
=
"x.AirlineUrl&&x.AirlineUrl.length>0"
>
<
!--
<
template
v
-
if
=
"x.AirlineUrl&&x.AirlineUrl.length>0"
>
<
q
-
img
:
src
=
"x.AirlineUrl"
:
ratio
=
"1"
...
...
@@ -290,67 +290,92 @@
:
width
=
"$q.platform.is.desktop ? '272px' : ''"
:
height
=
"$q.platform.is.desktop ? '' : '200px'"
class
=
"bg-grey-3"
/>
<
/template
>
<
div
class
=
"q-pa-md col column"
>
<!--
<
div
class
=
"text-subtitle1 text-weight-bold text-grey-9"
@
click
=
"GotoDetails(x)"
>
{{
x
.
AirLineName
}}
<
/div> --
>
<
/template> --
>
<
div
class
=
"q-pa-md col column"
@
click
=
"GotoDetails(x)"
>
<
div
class
=
"col"
v
-
for
=
"(item, index) in x.FlightList"
>
<
div
class
=
"row items-center f12 text-grey-6 q-mt-md"
>
<
q
-
chip
dense
color
=
"orange"
text
-
color
=
"white"
style
=
"height:40px;font-size:12px;"
>
<
div
style
=
" writing-mode: vertical-lr; transform: rotate(0deg);"
>
{{
item
.
FlightSubType
==
1
?
'去 程'
:
'回 程'
}}
<
/div> </
q
-
chip
>
<
div
outline
color
=
"secondary"
>
<
div
style
=
"display: flex;"
>
<
div
style
=
"margin-right:10px;"
>
{{
item
.
dName
}}
<
q
-
space
/>
{{
item
.
Departure_time
}}
<
/div
>
<
div
>
<
template
v
-
if
=
"item.FlightSubType==1&&x.DepartureTime"
>
<
template
v
-
if
=
"x.DepartureTime.Days>0"
><
span
>
{{
x
.
DepartureTime
.
Days
}}
h
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.DepartureTime.Hours>0"
><
span
>
{{
x
.
DepartureTime
.
Hours
}}
m
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.DepartureTime.Minutes>0"
>
<
span
>
{{
x
.
DepartureTime
.
Minutes
}}
s
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"item.StopType==2"
>
经停
<
/template
>
<
/template
>
<
template
v
-
else
-
if
=
"item.FlightSubType==3&&x.ArrivalTime"
>
<
template
v
-
if
=
"x.ArrivalTime.Days>0"
><
span
>
{{
x
.
ArrivalTime
.
Days
}}
h
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.ArrivalTime.Hours>0"
><
span
>
{{
x
.
ArrivalTime
.
Hours
}}
m
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.ArrivalTime.Minutes>0"
>
<
span
>
{{
x
.
ArrivalTime
.
Minutes
}}
s
&
nbsp
;
<
/span></
template
>
<
/template
>
<
q
-
separator
color
=
"orange"
inset
style
=
"margin-left:0px !important; margin-right:0px !important;"
/>
<
q
-
space
/>
<!--
启程
-->
<
div
class
=
"col"
v
-
for
=
"(item, index) in x.FlightList"
:
style
=
"(x.StartTripNum-1)==index?'margin-bottom:15px':''"
>
<
div
class
=
"row items-center f12 text-grey-6 q-mt-md"
>
<
q
-
chip
dense
color
=
"orange"
text
-
color
=
"white"
style
=
"height:40px;font-size:12px;"
>
<
div
style
=
" writing-mode: vertical-lr; transform: rotate(0deg);"
>
{{
item
.
FlightSubType
==
1
?
'去 程'
:
'回 程'
}}
<
/div> </
q
-
chip
>
<
div
outline
color
=
"secondary"
>
<
div
style
=
"display: flex;"
>
<
div
style
=
"margin-right:20px;margin-left:5px;"
>
{{
item
.
dName
}}
<
q
-
space
/>
<
div
style
=
"color:#333;"
>
{{
item
.
FlightDate
}}
{{
item
.
Departure_time
}}
<
/div
>
<
/div
>
<
div
style
=
"margin-right:20px;min-width:100px;width:auto;"
>
<
div
style
=
"text-align:center;"
>
{{
item
.
Flight_number
}}
<!--
+
{{
item
.
Span_days
}}
-->
<
/div
>
<
q
-
separator
color
=
"orange"
inset
style
=
"margin-left:0px !important; margin-right:0px !important;"
/>
<
q
-
space
/>
<
div
>
<
div
style
=
"margin-left: 5px;float: left;"
>
{{
item
.
DepartureName
}}
<
/div
>
<!--
<
div
style
=
"text-align:center;margin:0px 5px;"
>
<
template
v
-
if
=
"item.FlightSubType==1&&x.DepartureTime"
>
<
template
v
-
if
=
"x.DepartureTime.Days>0"
><
span
>
{{
x
.
DepartureTime
.
Days
}}
h
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.DepartureTime.Hours>0"
><
span
>
{{
x
.
DepartureTime
.
Hours
}}
m
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.DepartureTime.Minutes>0"
>
<
span
>
{{
x
.
DepartureTime
.
Minutes
}}
s
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"item.StopType==2"
>
经停
<
/template
>
<
/template
>
<
template
v
-
else
-
if
=
"item.FlightSubType==3&&x.ArrivalTime"
>
<
template
v
-
if
=
"x.ArrivalTime.Days>0"
><
span
>
{{
x
.
ArrivalTime
.
Days
}}
h
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.ArrivalTime.Hours>0"
><
span
>
{{
x
.
ArrivalTime
.
Hours
}}
m
&
nbsp
;
<
/span></
template
>
<
template
v
-
if
=
"x.ArrivalTime.Minutes>0"
>
<
span
>
{{
x
.
ArrivalTime
.
Minutes
}}
s
&
nbsp
;
<
/span></
template
>
<
/template>
<
/div> --
>
<
div
style
=
"margin-right: 5px;float: right;"
>
{{
item
.
ArrivalCityName
}}
<
/div
>
<
/div
>
<
/div
>
<
div
style
=
"margin-left:10px;"
>
{{
item
.
aName
}}
<
q
-
space
/>
{{
item
.
Arrival_time
}}
<
/div
>
{{
item
.
DepartureCountry
}}
{{
item
.
ArrivalCountry
}}
<
/div
>
<
/div
>
<
div
style
=
"margin-left:10px;"
>
{{
item
.
aName
}}
<
q
-
space
/>
{{
item
.
Arrival_time
}}
<
/div
>
<
/div>
<
/div
>
<
/div>
<
q
-
space
/>
<
/div
>
<
q
-
space
/>
<
/div
>
<
div
class
=
"row items-end"
@
click
=
"GotoDetails(x)"
>
<!--
<
q
-
icon
size
=
"12px"
name
=
"iconfont iconigw-l-date-trade"
class
=
"q-mr-sm"
><
/q-icon
>
<
q
-
badge
outline
color
=
"secondary"
:
label
=
"x.FlightDate"
/>
-->
<
div
class
=
"row items-end"
>
<
div
class
=
"col f12"
>
<
span
>
起飞时间:
<
/span
>
<
span
class
=
"text-primary text-weight-bold q-pr-sm q-mr-sm"
style
=
"border-right: 1px solid #efefef"
>
{{
x
.
FlightDate
}}
{{
x
.
WeekDayStr
}}
<
/span
>
<!--
<
span
>
起飞时间:
<
/span
>
<
span
class
=
"text-primary text-weight-bold q-pr-sm q-mr-sm"
style
=
"border-right: 1px solid #efefef"
>
{{
x
.
FlightDate
}}
{{
x
.
WeekDayStr
}}
<
/span> --
>
<
span
class
=
"text-primary text-weight-bold q-pr-sm q-mr-sm"
style
=
"border-right: 1px solid #efefef"
>
<
template
v
-
if
=
"x.AirlineUrl&&x.AirlineUrl.length>0"
>
<
q
-
img
rounded
:
src
=
"x.AirlineUrl"
:
ratio
=
"1"
spinner
-
color
=
"grey"
spinner
-
size
=
"20px"
:
width
=
"$q.platform.is.desktop ? '27px' : ''"
:
height
=
"$q.platform.is.desktop ? '' : '20px'"
class
=
"bg-grey-3"
style
=
"border-radius:50%;"
/>
<
/template
>
<
template
v
-
else
>
<
q
-
img
rounded
:
ratio
=
"1"
spinner
-
color
=
"grey"
spinner
-
size
=
"20px"
:
width
=
"$q.platform.is.desktop ? '27px' : ''"
:
height
=
"$q.platform.is.desktop ? '' : '20px'"
class
=
"bg-grey-3"
style
=
"border-radius:50%;"
/>
<
/template>
{{
x
.
AirLineName
}}
<
/span
>
<
span
>
剩餘空位:
<
/span
>
<
span
class
=
"text-secondary text-weight-bold"
>
{{
x
.
B2BSellNum
}}
<
/span
>
<
/div
>
...
...
@@ -361,8 +386,7 @@
<
/div
>
<
/div
>
<
/div
>
<
div
v
-
else
-
if
=
"!$q.loading.isActive &&DataList&& DataList.length == 0"
<
div
v
-
else
-
if
=
"!$q.loading.isActive &&DataList&& DataList.length == 0"
class
=
"text-center q-mt-xl"
>
<
div
class
=
"text-center inline-block"
>
...
...
@@ -902,7 +926,7 @@ export default {
}
,
GotoDetails(item) {
this.CommonJump('/
detailsProduct/' + encodeURIComponent(item.id)+ "
/
" + item.configId
,{
}
, "
blank
");
this.CommonJump('/
planeticketOrder/' + encodeURIComponent(item.TCID)
,{
}
, "
blank
");
}
,
SwitchTCID(obj,i,index) {
if(this.DataList&&this.DataList.length>0){
...
...
src/index.template.html
View file @
b29a2fea
...
...
@@ -19,7 +19,16 @@
<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> -->
<script
src=
"https://api.map.baidu.com/api?type=webgl&v=2.0&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>
-->
<!--HK 2024-08-15 新加 End -->
<script
src=
"http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"
></script>
<script>
function
countryCb
(
r
)
{
...
...
@@ -30,7 +39,7 @@
},
1000
);
}
else
{
loadScriptString
(
'https://api.map.baidu.com/api?type=webgl&v=2.0&ak=OBd2bhrqKUSbQGpniCZ996suti9YG7Bc
'
)
// loadScriptString('https://api.map.baidu.com/api?type=webgl&v=3.0&ak=L5Qw0GlbbCIMwgR4Uug3ogM40Imkd3CV
')
}
}
...
...
src/pages/line/planeticketOrder.vue
0 → 100644
View file @
b29a2fea
This diff is collapsed.
Click to expand it.
src/router/routes.js
View file @
b29a2fea
...
...
@@ -197,6 +197,12 @@ const routes = [{
component
:
()
=>
import
(
'pages/line/orderPreview.vue'
)
},
{
path
:
'/planeticketOrder/:id?'
,
//机票订单确认
meta
:
{
title
:
'订单确认'
},
component
:
()
=>
import
(
'pages/line/planeticketOrder.vue'
)
},
{
path
:
'/pay/:id?'
,
//自定义页面
meta
:
{
title
:
'订单支付'
},
...
...
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