Commit b29a2fea authored by 吴春's avatar 吴春

1

parent 1e0b3bfa
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
AddressObj:{ AddressObj:{
handler(newValue,onldValue) { handler(newValue,onldValue) {
this.center = newValue this.center = newValue
console.log(" this.center", this.center);
}, },
deep:true, deep:true,
immediate:true immediate:true
...@@ -47,45 +48,63 @@ ...@@ -47,45 +48,63 @@
}, },
methods: { methods: {
createMap() { createMap() {
if (!BMapGL) { if (this.map) {
return; this.map.clearOverlays()
} }
let map = new BMapGL.Map(`baidu-map_${this.center.Id}`); // 创建地图实例 let map = new BMap.Map(`baidu-map_${this.center.Id}`); // 创建地图实例
let point = new BMapGL.Point(this.center.Lng, this.center.Lat); // 创建点坐标 let point = new BMap.Point(this.center.Lng, this.center.Lat); // 创建点坐标
map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别 map.centerAndZoom(point, 15); // 初始化地图,设置中心点坐标和地图级别
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
var scaleCtrl = new BMapGL.ScaleControl(); // 添加比例尺控件 // var scaleCtrl = new BMap.ScaleControl(); // 添加比例尺控件
map.addControl(scaleCtrl); // map.addControl(scaleCtrl);
var zoomCtrl = new BMapGL.ZoomControl(); // 添加缩放控件//开启鼠标滚轮缩放 // var zoomCtrl = new BMap.ZoomControl(); // 添加缩放控件//开启鼠标滚轮缩放
map.addControl(zoomCtrl); // 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; this.map = map;
}, },
addMarker() { addMarker() {
let icon = require(`../../assets/img/marker.png`); 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像素。您可以看到在本例中该位置即是 // 角各偏移10像素和25像素。您可以看到在本例中该位置即是
// 图标中央下端的尖角位置。 // 图标中央下端的尖角位置。
anchor: new BMapGL.Size(10, 25), anchor: new BMap.Size(10, 25),
// 设置图片偏移。 // 设置图片偏移。
// 当您需要从一幅较大的图片中截取某部分作为标注图标时,您 // 当您需要从一幅较大的图片中截取某部分作为标注图标时,您
// 需要指定大图的偏移位置,此做法与css sprites技术类似。 // 需要指定大图的偏移位置,此做法与css sprites技术类似。
// imageOffset: new BMapGL.Size(0, 0 - 25) // 设置图片偏移 // 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); this.map.addOverlay(marker);
}, },
addLabel() { 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 content = this.center.Address;
var label = new BMapGL.Label(content, { var label = new BMap.Label(content, {
// 创建文本标注 // 创建文本标注
position: point, // 设置标注的地理位置 position: point, // 设置标注的地理位置
offset: new BMapGL.Size(10, -60), // 设置标注的偏移量 offset: new BMap.Size(10, -60), // 设置标注的偏移量
}); });
this.map.addOverlay(label); // 将标注添加到地图中 this.map.addOverlay(label); // 将标注添加到地图中
label.addEventListener("click", function (e) { label.addEventListener("click", function (e) {
...@@ -101,18 +120,18 @@ ...@@ -101,18 +120,18 @@
}); });
}, },
addCircle(){ addCircle(){
var mPoint = new BMapGL.Point(this.center.Lng, this.center.Lat); var mPoint = new BMap.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 circle = new BMap.Circle(mPoint,this.center.Range,{fillColor:"blue", strokeWeight: 1 ,fillOpacity: 0.3, strokeOpacity: 0.3});
this.map.addOverlay(circle); this.map.addOverlay(circle);
let getNeSw = circle.getBounds() let getNeSw = circle.getBounds()
var mPoint1 = new BMapGL.Point(getNeSw.ne.lng,getNeSw.ne.lat) var mPoint1 = new BMap.Point(getNeSw.ne.lng,getNeSw.ne.lat)
var mPoint2 = new BMapGL.Point(getNeSw.sw.lng,getNeSw.sw.lat) var mPoint2 = new BMap.Point(getNeSw.sw.lng,getNeSw.sw.lat)
let points=[mPoint1,mPoint2] let points=[mPoint1,mPoint2]
this.map.centerAndZoom(mPoint, this.map.getViewport(points).zoom+1); this.map.centerAndZoom(mPoint, this.map.getViewport(points).zoom+1);
}, },
getLocalSearch(){ getLocalSearch(){
var mPoint = new BMapGL.Point(this.center.Lng, this.center.Lat); var mPoint = new BMap.Point(this.center.Lng, this.center.Lat);
var local = new BMapGL.LocalSearch(this.map, {renderOptions: {map: this.map, autoViewport: false}}); var local = new BMap.LocalSearch(this.map, {renderOptions: {map: this.map, autoViewport: false}});
local.searchNearby(this.keywords,mPoint,this.center.Range); local.searchNearby(this.keywords,mPoint,this.center.Range);
}, },
......
...@@ -127,8 +127,8 @@ ...@@ -127,8 +127,8 @@
<q-card flat class="rounded-borders q-py-md q-mt-lg"> <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="text-subtitle1 text-weight-bold q-mx-md">行程類型</div>
<div class="q-gutter-sm" style=" display: inline-flex; justify-content: space-around;"> <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 @input="handleTicked" 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="2" label="单程" :dense="true" style="margin-left:2rem;"/>
</div> </div>
</q-card> </q-card>
...@@ -271,7 +271,7 @@ ...@@ -271,7 +271,7 @@
:class="$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'" :class="$q.platform.is.desktop ? 'row q-mb-md' : 'colmuns q-ma-md'"
v-for="(x, i) in DataList" :key="i" > 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 <q-img
:src="x.AirlineUrl" :src="x.AirlineUrl"
:ratio="1" :ratio="1"
...@@ -290,24 +290,32 @@ ...@@ -290,24 +290,32 @@
:width="$q.platform.is.desktop ? '272px' : ''" :width="$q.platform.is.desktop ? '272px' : ''"
:height="$q.platform.is.desktop ? '' : '200px'" :height="$q.platform.is.desktop ? '' : '200px'"
class="bg-grey-3" /> class="bg-grey-3" />
</template> </template> -->
<div class="q-pa-md col column"> <div class="q-pa-md col column" @click="GotoDetails(x)">
<!-- <div class="text-subtitle1 text-weight-bold text-grey-9" @click="GotoDetails(x)">
{{ x.AirLineName }}
</div> -->
<div class="col" v-for="(item, index) in x.FlightList" > <!-- 启程 -->
<div class="row items-center f12 text-grey-6 q-mt-md"> <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;"> <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 style=" writing-mode: vertical-lr; transform: rotate(0deg);">{{item.FlightSubType==1?'去&nbsp;程':'回&nbsp;程'}}</div> </q-chip>
<div outline color="secondary" > <div outline color="secondary" >
<div style="display: flex;"> <div style="display: flex;">
<div style="margin-right:10px;"> <div style="margin-right:20px;margin-left:5px;">
{{item.dName}} {{item.dName}}
<q-space /> <q-space />
{{item.Departure_time}} <div style="color:#333;"> {{item.FlightDate}} {{item.Departure_time}}</div>
</div> </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="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.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.Hours>0"><span> {{x.DepartureTime.Hours}}m&nbsp;</span></template>
...@@ -319,12 +327,9 @@ ...@@ -319,12 +327,9 @@
<template v-if="x.ArrivalTime.Hours>0"><span> {{x.ArrivalTime.Hours}}m&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 v-if="x.ArrivalTime.Minutes>0"> <span> {{x.ArrivalTime.Minutes}}s&nbsp;</span></template>
</template> </template>
<q-separator color="orange" inset style="margin-left:0px !important; margin-right:0px !important;" /> </div> -->
<q-space /> <div style="margin-right: 5px;float: right;">{{item.ArrivalCityName}}</div>
</div>
{{item.DepartureCountry}} {{item.ArrivalCountry}}
</div> </div>
<div style="margin-left:10px;"> <div style="margin-left:10px;">
...@@ -338,19 +343,39 @@ ...@@ -338,19 +343,39 @@
</div> </div>
</div> </div>
<q-space /> <q-space />
</div>
<div class="row items-end" @click="GotoDetails(x)"> </div>
<!-- <q-icon <div class="row items-end" >
size="12px"
name="iconfont iconigw-l-date-trade"
class="q-mr-sm"
></q-icon>
<q-badge outline color="secondary" :label="x.FlightDate" /> -->
<div class="col f12"> <div class="col f12">
<span>起飞时间:</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" >{{ 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>剩餘空位:</span>
<span class="text-secondary text-weight-bold" >{{ x.B2BSellNum }}</span> <span class="text-secondary text-weight-bold" >{{ x.B2BSellNum }}</span>
</div> </div>
...@@ -361,8 +386,7 @@ ...@@ -361,8 +386,7 @@
</div> </div>
</div> </div>
</div> </div>
<div <div v-else-if="!$q.loading.isActive &&DataList&& DataList.length == 0"
v-else-if="!$q.loading.isActive &&DataList&& DataList.length == 0"
class="text-center q-mt-xl" class="text-center q-mt-xl"
> >
<div class="text-center inline-block"> <div class="text-center inline-block">
...@@ -902,7 +926,7 @@ export default { ...@@ -902,7 +926,7 @@ export default {
}, },
GotoDetails(item) { GotoDetails(item) {
this.CommonJump('/detailsProduct/' + encodeURIComponent(item.id)+ "/" + item.configId,{}, "blank"); this.CommonJump('/planeticketOrder/' + encodeURIComponent(item.TCID),{}, "blank");
}, },
SwitchTCID(obj,i,index) { SwitchTCID(obj,i,index) {
if(this.DataList&&this.DataList.length>0){ if(this.DataList&&this.DataList.length>0){
......
...@@ -19,7 +19,16 @@ ...@@ -19,7 +19,16 @@
<link rel="icon" type="image/ico" href="statics/icons/favicon.ico"> <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 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 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 src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
<script> <script>
function countryCb(r) { function countryCb(r) {
...@@ -30,7 +39,7 @@ ...@@ -30,7 +39,7 @@
}, 1000); }, 1000);
} else { } 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 = [{ ...@@ -197,6 +197,12 @@ const routes = [{
component: () => component: () =>
import ('pages/line/orderPreview.vue') import ('pages/line/orderPreview.vue')
}, },
{
path: '/planeticketOrder/:id?', //机票订单确认
meta: { title: '订单确认' },
component: () =>
import ('pages/line/planeticketOrder.vue')
},
{ {
path: '/pay/:id?', //自定义页面 path: '/pay/:id?', //自定义页面
meta: { title: '订单支付' }, 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