Commit b29a2fea authored by 吴春's avatar 吴春

1

parent 1e0b3bfa
......@@ -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 BMapGL.Map(`baidu-map_${this.center.Id}`); // 创建地图实例
let point = new BMapGL.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 BMapGL.Icon(icon, new BMapGL.Size(23, 25), {
var myIcon = new BMap.Icon(icon, new BMap.Size(23, 25), {
// 指定定位位置。
// 当标注显示在地图上时,其所指向的地理位置距离图标左上
// 角各偏移10像素和25像素。您可以看到在本例中该位置即是
// 图标中央下端的尖角位置。
anchor: new BMapGL.Size(10, 25),
anchor: new BMap.Size(10, 25),
// 设置图片偏移。
// 当您需要从一幅较大的图片中截取某部分作为标注图标时,您
// 需要指定大图的偏移位置,此做法与css sprites技术类似。
// imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移
});
let point = new BMapGL.Point(this.center.Lng, this.center.Lat); // 创建点坐标
let point = new BMap.Point(this.center.Lng, this.center.Lat); // 创建点坐标
// 创建标注对象并添加到地图
var marker = new BMapGL.Marker(point, { icon: myIcon });
var marker = new BMap.Marker(point, { icon: myIcon });
this.map.addOverlay(marker);
},
addLabel() {
var point = new BMapGL.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 BMapGL.Label(content, {
var label = new BMap.Label(content, {
// 创建文本标注
position: point, // 设置标注的地理位置
offset: new BMapGL.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 BMapGL.Point(this.center.Lng, this.center.Lat);
var circle = new BMapGL.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 BMapGL.Point(getNeSw.ne.lng,getNeSw.ne.lat)
var mPoint2 = new BMapGL.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 BMapGL.Point(this.center.Lng, this.center.Lat);
var local = new BMapGL.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);
},
......
......@@ -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?'去&nbsp;程':'回&nbsp;程'}}</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?'去&nbsp;程':'回&nbsp;程'}}</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){
......
......@@ -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')
}
}
......
This diff is collapsed.
......@@ -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: '订单支付' },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment