Commit cbd1d523 authored by 罗超's avatar 罗超

调整

parent 1b005a83
<template>
<div class="rounded-borders overflow-hidden q-pb-md" :style="{'width':width,'background-color':bgColor}" v-if="product">
<q-img :src="product.ImgCover" spinner-color="white" :ratio="16/9" fit="cover">
<q-img :src="product.ImgCover==''?'http://www.oytour.com':product.ImgCover" spinner-color="white" :ratio="16/9" fit="cover">
<div class="absolute-top text-shadow" style="background: linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0));">
{{ formatEnum(product.ProductType) }}
</div>
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-white">
暫無圖片
</div>
</template>
</q-img>
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height: 74px;" @click="CommonJump(product,{},'blank')">{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
......
<template>
<!-- <div class="rounded-borders overflow-hidden q-pb-md" :style="{'width':width,'background-color':bgColor}" v-if="product">
<q-img :src="product.ImgCover" spinner-color="white" :ratio="16/9" fit="cover" />
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer">{{ product.Title }}{{ product.Title }}{{ product.Title }}{{ product.Title }}{{ product.Title }}</div>
<div class="text-subtitle2 text-weight-bolder text-dark q-mx-md">
<span>CNY {{moneyFormat(product.B2CPrice,2)}}</span>
<span class="f12 q-ml-sm"></span>
</div>
</div> -->
<div class="rounded-borders overflow-hidden" v-if="product">
<div class="row" :style="{'background-color':bgColor}" >
<q-img :src="product.ImgCover" spinner-color="dark" :ratio="4/3" fit="cover" class=" col-5" >
<q-img :src="product.ImgCover==''?'http://www.oytour.com':product.ImgCover" spinner-color="dark" :ratio="4/3" fit="cover" class=" col-5" >
<div class="absolute-top text-shadow" style="background: linear-gradient(rgba(0, 0, 0, 0.5),rgba(0, 0, 0, 0));">
{{ formatEnum(product.ProductType) }}
</div>
<template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-white">
暫無圖片
</div>
</template>
</q-img>
<div class="q-px-md col">
<div class="ellipsis-2-lines text-body1 q-ma-md cursor-pointer" style="height:50px;" @click="CommonJump(product,{},'blank')">{{ product.Title }}</div>
......
<template>
<div style="min-height: 80vh">
<div
style="
position: fixed;
......@@ -29,7 +28,10 @@
class="col product-price text-subtitle1 text-weight-bold"
style="text-align: left"
>
<span v-if="priceList&&priceList.length">{{dataList.CurrencyCode}} {{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span>
<span v-if="priceList && priceList.length"
>{{ dataList.CurrencyCode }}
{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span
>
<span class="q-ml-sm f12 text-grey-7"></span>
</span>
<q-btn
......@@ -58,63 +60,91 @@
class="cursor-pointer"
@click="CommonJump('/index', {})"
/>
<q-breadcrumbs-el label="日本" class="cursor-pointer" />
<q-breadcrumbs-el>
<span v-for="(x, i) in citys" :key="i">
<span class="cursor-pointer">{{ x }} </span>
<span v-if="i + 1 != citys.length" class="q-mr-sm"></span>
</span>
</q-breadcrumbs-el>
<q-breadcrumbs-el
:label="dataList.CountryName"
class="cursor-pointer"
/>
<q-breadcrumbs-el
v-if="$q.platform.is.desktop"
:label="dataList.title"
:label="dataList.Name"
class="text-grey-6 ellipsis"
/>
</q-breadcrumbs>
<div class="text-grey-6 f12">Product No. # {{ dataList.id }}</div>
<div class="text-grey-6 f12">Product No. # {{ dataList.ID }}</div>
</div>
<div class="relative">
<div class="row rounded-borders" style="height: 35vh">
<div class="col">
<q-img
:src="dataList.imgCover[0]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="35vh"
/>
</div>
<div
class="q-ml-sm column"
v-if="dataList.imgCover.length > 1"
:style="{ width: dataList.imgCover.length < 3 ? '30%' : '20%' }"
>
<div class="col rounded-borders overflow-hidden">
<q-img
:src="dataList.imgCover[1]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="100%"
/>
</div>
<div style="padding-bottom: calc((100% - 0px) / 3); position: relative">
<div
style="position: absolute; left: 0; top: 0; right: 0; bottom: 0"
class="overflow-hidden rounded-borders"
v-if="dataList.imgCover.length >= 3"
class="col q-mt-sm rounded-borders overflow-hidden"
>
<slider
ref="slider"
:options="options"
@slide="slideHandler"
style="height: 100%"
<q-img
:src="dataList.imgCover[2]"
spinner-color="dark"
spinner-size="20px"
class=""
height="100%"
/>
</div>
</div>
<div
class="q-ml-sm column"
v-if="dataList.imgCover.length > 3"
style="width: 20%"
>
<slideritem
v-if="dataList.videoStr"
style="width: 80%"
class="q-mx-sm"
key="video"
<div class="col rounded-borders overflow-hidden">
<q-img
:src="dataList.imgCover[3]"
spinner-color="dark"
spinner-size="20px"
class="rounded-borders"
height="100%"
/>
</div>
<div
v-if="dataList.imgCover.length >= 5"
class="col q-mt-sm rounded-borders overflow-hidden"
>
<vue-core-video-players
ref="video"
:src="dataList.videoStr"
:title="dataList.title"
:muted="true"
:autoplay="false"
@play="playHandler"
@pause="pauseHandler"
@seeked="seekedChangeHandler"
@timeupdate="timeChangeHandler"
logo="../statics/img/transparent_logo.png"
:loop="false"
id="trip_video"
<q-img
:src="dataList.imgCover[4]"
spinner-color="dark"
spinner-size="20px"
class=""
height="100%"
/>
</slideritem>
<slideritem
v-for="(item, index) in dataList.imgCover"
:key="index"
style="width: 80%"
class="q-mx-sm"
</div>
</div>
</div>
<div
class="absolute q-py-sm q-px-md row items-center text-white rounded-borders cursor-pointer light-shadow"
style="bottom: 20px; right: 20px; background: rgba(0, 0, 0, 0.5)"
@click="showPreview(dataList.imgCover, 0)"
>
<q-img :src="item" spinner-color="grey" spinner-size="20px" />
</slideritem>
<div slot="loading">loading...</div>
</slider>
<q-icon name="iconfont iconimage" size="16px"></q-icon>
<span class="q-ml-sm">查看照片</span>
</div>
</div>
<div
......@@ -131,13 +161,7 @@
size="16px"
class="q-mr-sm"
/>
<span
>{{dataList.CountryName}} -
<span>
<span class="cursor-pointer">{{dataList.CityName}}</span>
</span>
</span>
<span>{{ dataList.SelffetchAddress }} </span>
</div>
<div class="q-mt-md row">
<q-chip
......@@ -150,7 +174,8 @@
class="transparent q-mr-xl no-padding"
square
icon="iconfont icontime"
label="行程時間 1 天" />
label="行程時間 1 天"
/>
<q-chip
class="transparent q-mr-xl no-padding"
square
......@@ -168,9 +193,16 @@
$q.platform.is.mobile,
}"
>
<div class="product-price text-h6" v-if="priceList&&priceList.length>0">
<div
class="text-h6 text-right"
v-if="priceList && priceList.length > 0"
>
<!-- CNY:{{ dataList. }} -->
{{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}}{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}
<span class="text-subtitle2"
>{{
dataList.CurrencyCode ? dataList.CurrencyCode : "CNY"
}}</span
>{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}
<span class="f12 text-grey-6"></span>
</div>
<div v-else class="text-subtitle1 text-grey-6">暫無報價</div>
......@@ -178,7 +210,7 @@
color="primary"
label="選擇方案"
unelevated
:disable="priceList.length>0?false:true"
:disable="priceList.length > 0 ? false : true"
@click="goScrollHandler(priceListHeight)"
:class="{ 'q-mt-md full-width': $q.platform.is.desktop }"
/>
......@@ -273,7 +305,6 @@
@reset="resetHandler"
@getPriceList="getPriceList"
></order-preview>
</div>
<!--方案选择区 -->
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">
......@@ -289,7 +320,7 @@
class="text-subtitle1 text-weight-bold row items-center"
v-if="$q.platform.is.desktop"
>
<span class="q-mr-md">行程標準出行方案</span>
<span class="q-mr-md">产品门票方案</span></span>
<q-chip
square
color="orange"
......@@ -310,10 +341,8 @@
<div class="" v-if="$q.platform.is.desktop">
<div class="row items-center">
<span class="product-price text-h6 q-mr-md"
>{{dataList.CurrencyCode?dataList.CurrencyCode:'CNY'}}
{{
moneyFormat(priceList[0].originalB2CPrice, 0)
}}</span
>{{ dataList.CurrencyCode ? dataList.CurrencyCode : "CNY" }}
{{ moneyFormat(priceList[0].originalB2CPrice, 0) }}</span
>
<q-btn
color="primary"
......@@ -371,7 +400,6 @@
</div>
</div>
</div>
</div>
</div>
......@@ -384,9 +412,15 @@
<div
:class="{ 'col-8': $q.platform.is.desktop, col: $q.platform.is.mobile }"
>
<div ref="product" class="text-h5 text-weight-bold text-left q-mt-xl" :class="{
<div
ref="product"
class="text-h5 text-weight-bold text-left q-mt-xl"
:class="{
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">產品介紹</div>
}"
>
產品介紹
</div>
<div
class="q-mt-md"
ref="diyContext"
......@@ -399,18 +433,47 @@
'q-px-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
>
<div v-if="dataList.OpeningHours" class="row"><span>开放时间</span><div>{{dataList.OpeningHours}} {{dataList.OpeningHours.substring(6,13)}} 停止入场</div></div>
<div v-if="dataList.GeographicTag||dataList.ScenicSpotTag" class="row"><span>景区特色</span>
<div v-if="dataList.OpeningHours" class="row">
<span>开放时间</span>
<div>
{{ dataList.OpeningHours }}
{{ dataList.OpeningHours.substring(6, 13) }} 停止入场
</div>
</div>
<div
v-if="dataList.GeographicTag || dataList.ScenicSpotTag"
class="row"
>
<span>景区特色</span>
<div>
<q-chip v-if="dataList.GeographicTag" size="14px" clickable v-for="(s,i) in dataList.GeographicTag.split(',')" :key="i"
<q-chip
v-if="dataList.GeographicTag"
size="14px"
clickable
v-for="(s, i) in dataList.GeographicTag.split(',')"
:key="i"
text-color="white"
color="primary" square>{{ s }}</q-chip>
<q-chip v-if="dataList.ScenicSpotTag" size="14px" clickable v-for="(s,i) in dataList.ScenicSpotTag.split(',')" :key="i"
color="primary"
square
>{{ s }}</q-chip
>
<q-chip
v-if="dataList.ScenicSpotTag"
size="14px"
clickable
v-for="(s, i) in dataList.ScenicSpotTag.split(',')"
:key="i"
text-color="dark"
color="grey-3" square>{{ s }}</q-chip>
color="grey-3"
square
>{{ s }}</q-chip
>
</div>
</div>
<div v-if="dataList.TrafficInfo" class="row"><span>交通说明</span><div>{{dataList.TrafficInfo?dataList.TrafficInfo:'-'}}</div></div>
<div v-if="dataList.TrafficInfo" class="row">
<span>交通说明</span>
<div>{{ dataList.TrafficInfo ? dataList.TrafficInfo : "-" }}</div>
</div>
</div>
<div
......@@ -448,15 +511,27 @@
style="border: 1px dashed var(--q-color-warning)"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}">
<div class="q-pa-md" style="border-bottom: 1px dashed var(--q-color-warning)">
<div class="text-weight-bold text-h6">地點名稱:{{dataList.Name}}</div>
<div class="text-grey-9">地址:{{`${dataList.Address}`}}</div>
}"
>
<div
class="q-pa-md"
style="border-bottom: 1px dashed var(--q-color-warning)"
>
<div class="text-weight-bold text-h6">
地點名稱:{{ dataList.Name }}
</div>
<div class="q-pa-md" :class="{
<div class="text-grey-9">地址:{{ `${dataList.Address}` }}</div>
</div>
<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"/>
}"
>
<componentsMap
v-if="AddressObj.Lng && AddressObj.Lat"
:AddressObj="AddressObj"
/>
<div v-else class="card text-center">经纬度未知</div>
</div>
</div>
......@@ -473,9 +548,7 @@
class="q-mt-lg trip-text bg-white q-pa-md rounded-borders q-mb-xl"
style="border: 1px dashed var(--q-color-info)"
v-html="
dataList.About
? dataList.About || '暂无溫馨提示'
: '暂无溫馨提示'
dataList.About ? dataList.About || '暂无溫馨提示' : '暂无溫馨提示'
"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
......@@ -516,7 +589,6 @@
</div>
<template v-if="$q.platform.is.desktop">
<div class="col-1"></div>
<div class="col q-ml-xl position-relative">
<div style="position: sticky; top: 100px">
......@@ -558,7 +630,7 @@ export default {
return {
AddressObj: null,
priceList: [],
selectedId: '',
selectedId: "",
currentYM: { year: 2023, month: 2, str: "2023-02" }, // 当前年月
isCurrent: false,
isLast: false,
......@@ -696,13 +768,13 @@ export default {
},
mounted() {
window.addEventListener("scroll", this.handleScroll);
const timeStamp = Date.now()
const formattedString = date.formatDate(timeStamp, 'YYYY-MM')
const timeStamp = Date.now();
const formattedString = date.formatDate(timeStamp, "YYYY-MM");
this.currentYM = {
year: date.formatDate(timeStamp, 'YYYY'),
month: date.formatDate(timeStamp, 'MM'),
str: formattedString
}
year: date.formatDate(timeStamp, "YYYY"),
month: date.formatDate(timeStamp, "MM"),
str: formattedString,
};
if (localStorage.baseifo) {
this.TripConfig = JSON.parse(window.localStorage.getItem("baseifo"));
}
......@@ -710,14 +782,14 @@ export default {
this.getData();
},
methods: {
changeShowOrderPreviewHandler(){
this.showOrderPreview=!this.showOrderPreview
if(!this.showOrderPreview){
this.changeTripShowHandler()
changeShowOrderPreviewHandler() {
this.showOrderPreview = !this.showOrderPreview;
if (!this.showOrderPreview) {
this.changeTripShowHandler();
}
this.dataList.TicketList.forEach(x=>{
x.checked = false
})
this.dataList.TicketList.forEach((x) => {
x.checked = false;
});
},
changeTripShowHandler() {
this.$nextTick(() => {
......@@ -729,12 +801,12 @@ export default {
});
});
},
getPriceList(Arr,id){
this.priceList = JSON.parse(Arr)
if(this.selectedId === id) {
this.selectedId = ''
getPriceList(Arr, id) {
this.priceList = JSON.parse(Arr);
if (this.selectedId === id) {
this.selectedId = "";
} else {
this.selectedId = id
this.selectedId = id;
}
},
getTopNum(x) {
......@@ -812,17 +884,25 @@ export default {
resetHandler() {
this.currentPrice.startDate = "";
if(!this.$q.platform.is.mobile){
if (!this.$q.platform.is.mobile) {
this.$refs.calendar.reset();
}
},
changeChosenDateHandler(val) {
val.price.version = new Date().getTime();
this.currentPrice = JSON.parse(JSON.stringify(val.price));
if(this.$q.platform.is.mobile){
if (this.$q.platform.is.mobile) {
this.$refs.qDateProxy.hide();
}
},
showPreview(images, index = 0) {
this.$viewerApi({
options: {
initialViewIndex: index,
},
images,
});
},
showDialog() {
this.isShowDialog = true;
},
......@@ -839,17 +919,21 @@ export default {
(r) => {
if (r.data.resultCode == 1) {
let addList = function (arr) {
arr.forEach(item => {
item.checked = false
item.Count = 1
arr.forEach((item) => {
item.checked = false;
item.Count = 1;
});
};
addList(r.data.data.TicketList);
this.dataList = r.data.data;
this.selectedId = this.dataList.TicketList.find(x=>x.Id)
this.selectedId = this.dataList.TicketList.find((x) => x.Id);
this.dataList.imgCover = this.dataList.PicPathList;
this.AddressObj = this.dataList
this.AddressObj.Address = `${this.dataList.CountryName?this.dataList.CountryName+'-':''}${this.dataList.CityName?this.dataList.CityName+'-':''}${this.dataList.ProvinceName?this.dataList.ProvinceName+'-':''}${this.dataList.Address}`
this.AddressObj = this.dataList;
this.AddressObj.Address = `${
this.dataList.CountryName ? this.dataList.CountryName + "-" : ""
}${this.dataList.CityName ? this.dataList.CityName + "-" : ""}${
this.dataList.ProvinceName ? this.dataList.ProvinceName + "-" : ""
}${this.dataList.Address}`;
this.isShow = true;
if (this.dataList.videoStr && this.dataList.videoStr != "") {
this.options.loop = false;
......@@ -865,11 +949,13 @@ export default {
});
}
this.$nextTick(() => {
this.getCarPriceData()
this.getCarPriceData();
setTimeout(() => {
this.navs.forEach((x) => {
x.top =
this.$refs[x.val].getBoundingClientRect().top + this.currentHeight - 60;
this.$refs[x.val].getBoundingClientRect().top +
this.currentHeight -
60;
});
this.priceListHeight =
this.$refs.pricelist.getBoundingClientRect().top +
......@@ -886,7 +972,6 @@ export default {
// console.log('异常信息', error)
}
});
} else {
this.$q.notify({
type: "negative",
......@@ -901,7 +986,7 @@ export default {
},
// 获取报价的详情
getCarPriceData() {
this.priceList = []
this.priceList = [];
this.apipost(
"b2c_get_GetTicketCouponsMonthPriceAll",
{
......@@ -911,10 +996,14 @@ export default {
},
(r) => {
if (r.data.resultCode == 1) {
let arr = []
r.data.data.forEach(x=>{
x.PriceList = x.PriceList.sort((a,b)=>{return a.Price-b.Price})
let MailingMoneyList = x.PriceList.sort((a,b)=>{return b.MailingMoney-a.MailingMoney})
let arr = [];
r.data.data.forEach((x) => {
x.PriceList = x.PriceList.sort((a, b) => {
return a.Price - b.Price;
});
let MailingMoneyList = x.PriceList.sort((a, b) => {
return b.MailingMoney - a.MailingMoney;
});
let dataObj = {
startDate: x.Date,
originalB2CPrice: x.PriceList[0].Price,
......@@ -923,15 +1012,19 @@ export default {
safeMoney: 0,
MailingMoney: MailingMoneyList[0].MailingMoney,
PriceList: x.PriceList,
};
if (
date.formatDate(Date.now(), "YYYY-MM-DD") != x.Date &&
x.Date > date.formatDate(Date.now(), "YYYY-MM-DD")
) {
arr.push(dataObj);
}
if(date.formatDate(Date.now(), 'YYYY-MM-DD')!=x.Date&&x.Date>date.formatDate(Date.now(), 'YYYY-MM-DD')){
arr.push(dataObj)
}
})
this.priceList = JSON.parse(JSON.stringify(arr))
});
this.priceList = JSON.parse(JSON.stringify(arr));
}
},null)
},
null
);
},
menu() {
this.scroll =
......@@ -951,12 +1044,12 @@ export default {
</script>
<style>
.active-trip-module {
.active-trip-module {
color: var(--q-color-primary);
font-weight: 800;
position: relative;
}
.active-trip-module::before {
}
.active-trip-module::before {
position: absolute;
content: " ";
top: 0;
......@@ -965,7 +1058,7 @@ export default {
width: 5px;
border-radius: 5px;
background: var(--q-color-primary);
}
}
.slider-item {
transform: scale(1);
transition-timing-function: ease;
......
......@@ -146,12 +146,14 @@
<span
>{{ dataList.aimPlaceName }}
<template v-if="citys.length>0">
<span class="q-mx-sm">途徑:</span>
<span v-for="(x, i) in citys" :key="i">
<span class="cursor-pointer">{{ x }} </span>
<span v-if="i + 1 != citys.length" class="q-mr-sm">,</span>
</span>
</template>
</span>
</div>
<div class="q-mt-md row">
......@@ -580,7 +582,7 @@
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
}"
></div>
<div
<!-- <div
class="text-h5 text-weight-bold text-left q-mt-xl"
ref="cancelTips"
:class="{
......@@ -588,8 +590,17 @@
}"
>
取消政策
</div> -->
<div class="q-mt-lg f12 text-grey-6">
<q-icon name="iconfont icontishi" class="q-mr-sm" />
<span
>注意:由于站内商品来自全球各地,订单取消时间将依该供应商所在时区判定。供应商需
2-5
个工作天进行取消流程,依照您购买的商品取消政策收取手续费,并于取消流程完成后14
个工作天内退款。</span
>
</div>
<div
<!-- <div
class="q-mt-lg trip-text q-mb-xl"
:class="{
'q-mx-md': $q.screen.width < 1220 && $q.platform.is.mobile,
......@@ -615,7 +626,7 @@
个工作天内退款。</span
>
</div>
</div>
</div> -->
</div>
<template v-if="$q.platform.is.desktop">
......@@ -703,9 +714,9 @@ export default {
loop: true,
},
warnBuy: [
"未满 2 岁幼儿不占位可免费参加(不含座位,餐点,门票,床位),请先于下订时在「备注栏」告知。",
"未满 2 岁幼儿我們將按照嬰兒價格執行。請下單是注意區分",
"如需要單人房,請購買單房",
"不占床2-11(包含)岁幼童可购买儿童价,如需占床請購買成人價",
"不占床2-11(包含)岁幼童可购买儿童价,如需占床請購買佔床產品",
"12歲以上皆視同成人售價",
],
showOrderPreview: false,
......@@ -751,12 +762,12 @@ export default {
isActive: false,
display: "溫馨提示",
},
{
val: "cancelTips",
top: 0,
isActive: false,
display: "取消政策",
},
// {
// val: "cancelTips",
// top: 0,
// isActive: false,
// display: "取消政策",
// },
],
priceListHeight: 0,
stickyHeight: 0,
......@@ -1227,6 +1238,9 @@ export default {
.line-feature * {
line-height: normal !important;
}
.line-feature .draggable{
position: absolute;
}
.slider-item {
transform: scale(1);
transition-timing-function: ease;
......
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