Commit 77dd57b7 authored by 沈良进's avatar 沈良进

Merge branch 'master' of http://gitlab.oytour.com/viitto/million

parents 8d7211d9 d33c2887
<template>
<div class="block-item">
<!-- transition-prev="scale"
transition-next="scale" -->
<!-- transition-prev="slide-right"
transition-next="slide-left" -->
<q-carousel v-model="slide"
<q-carousel
swipeable
animated
v-model="slide"
infinite
:autoplay="autoplay"
transition-prev="slide-right"
transition-next="slide-left"
swipeable animated
control-color="white" infinite arrows height="100%"
class="my-bg-grey text-black shadow-1 no-shadow"
control-type="regular"
:arrows="day.details.length>0?false:false"
control-text-color="primary"
ref="carousel"
>
ref="carousel">
<template v-for="(x, i) in day.details">
<q-carousel-slide :name="i" class="column no-wrap">
<div class="bg-white row">
......@@ -29,12 +23,11 @@
></video>
</template>
<template v-else>
<q-img
<q-img @click="showPreview(day.details,i)"
v-if="x.img"
:src="x.img"
:ratio=" 16/9 "
style="width: 100%"
@click="showPreview(day.details,i)"
>
<template v-slot:error>
<div
......@@ -44,7 +37,7 @@
</div>
</template>
</q-img>
<q-img
<q-img @click="showPreview(day.details,i)"
v-else
src="../../../assets/img/nll.jpg"
:ratio=" 16/9 "
......@@ -179,6 +172,9 @@
};
</script>
<style scoped>
.q-carousel{
height: auto !important;
}
.q-carousel__slide{
padding: 0 !important;
}
......
......@@ -9,10 +9,10 @@
</style>
<template>
<div class="trip-box">
<div :class="{'trip-block':$q.platform.is.desktop,'q-pb-lg':$q.platform.is.mobile,'q-pt-lg':$q.platform.is.mobile&&i==0}" v-for="(item,i) in trips" :key="i">
<div :class="{'trip-block':$q.platform.is.desktop,'q-pb-lg':$q.platform.is.mobile,'q-pt-lg':$q.platform.is.mobile&&i==0}"
v-for="(item,i) in trips" :key="i" :id="`days_${i}`">
<template v-if="$q.platform.is.desktop">
<div class="trip-title" :id="`days_${i}`">
<div class="trip-title">
<div>
<p class="day"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</p>
<!-- <p>{{item.dateTime}}</p> -->
......@@ -26,7 +26,7 @@
<fiveday v-if="item.details && item.details.length>=5" :day='item' :isDirect="isDirect"></fiveday>
</template>
<template v-else>
<div :id="`days_${i}`">
<div>
<div class="bg-grey-3 q-px-lg q-py-md">
<div>
<div class="fz28 text-red"><span class="fz28" style="font-weight: bold;"><span v-if='item.dayNum<10'>0</span>{{item.dayNum}}</span></div>
......@@ -69,8 +69,7 @@
try{
this.daysClass.forEach((x,i)=>{
var object=document.getElementById(`days_${i}`);
x.top = object.getBoundingClientRect().top+100
x.top = object.getBoundingClientRect().top+60
})
} catch (error) {
console.log('----异常')
......
......@@ -244,10 +244,12 @@
></calendar>
</q-popup-proxy>
</q-field>
<template v-if="currentPrice&&currentPrice.startDate">
<order-preview class="q-pa-md"
:price="currentPrice"
@reset="resetHandler"
></order-preview>
</template>
</div>
<div class="text-h6 q-pt-lg" v-if="$q.platform.is.mobile">所選方案詳情</div>
......@@ -353,7 +355,7 @@
class="trip-module text-subtitle2 cursor-pointer q-mb-lg"
v-for="(x, i) in days"
:key="i"
@click="goScrollHandler(x.top + 20)"
@click="goScrollHandler(x.top + 100)"
:class="{
'active-trip-moduleDay text-red active':
currentHeight >= x.top &&
......@@ -384,7 +386,7 @@
行程介紹
</div>
<div class="q-pb-xl" >
<smaple :trip="dataList" :class="{'q-px-md': $q.screen.width < 1220&&$q.platform.is.mobile}"></smaple>
<smaple :trip="dataList" :class="{'q-px-md': $q.screen.width < 1220&&$q.platform.is.desktop}"></smaple>
<template v-if="dataList.dayList.length<=3">
<trip :trip="dataList" @change="changeTripShowHandler"></trip>
</template>
......@@ -584,8 +586,6 @@ export default {
priceListHeight: 0,
stickyHeight: 0,
zoomDiyContext: 1,
currentHeightDay: 0,
stickyHeightDay: 0
};
},
components: {
......@@ -598,12 +598,6 @@ export default {
block
},
watch: {
currentHeightDay:{
handler: function (val, oldval) {
this.currentHeightDay = val
},
deep: true
},
days: {
handler: function (val, oldval) {
this.days = val
......@@ -670,7 +664,7 @@ export default {
// }
this.stickyHeight = document.querySelector(".q-header--hidden")
? "translateY(0px)"
: "translateY(60px)";
: "translateY(85px)";
this.currentHeight = temp;
if (
this.videoPosition > 0 &&
......@@ -734,6 +728,7 @@ export default {
//console.log(e)
},
resetHandler() {
this.currentPrice.startDate = ''
this.$refs.calendar.reset();
},
changeChosenDateHandler(val) {
......@@ -789,12 +784,16 @@ export default {
}
this.$nextTick(() => {
if(this.dataList.feature.featureHtml!=''){
let tw =
this.$q.platform.is.desktop?parseFloat(
this.$refs.diyContext.getBoundingClientRect().width
) / 1123.0 :parseFloat(
let tw = parseFloat(
this.$refs.diyContext.getBoundingClientRect().width
) / 975.0;
) / 1123.0
if(this.$q.platform.is.mobile){
let divArr = document.querySelectorAll("#setZoom>div")
for(let i=0;i<divArr.length;i++){
let div = divArr[i]
div.style.zoom = div.offsetWidth>1000?0.999:document.documentElement.clientWidth/1123.0
}
}
this.zoomDiyContext = tw > 1 ? 1 : tw.toFixed(2);
}
......@@ -894,7 +893,8 @@ export default {
background: var(--q-color-primary);
}
.trip-module{
color: #9E9E9E;
transition: all .3s;
font-weight: 100;
text-align: center;
line-height: 38px;
......@@ -905,10 +905,6 @@ export default {
border-radius: 50%;
font-family: lettergothicstd;
}
.trip-module{
color: #9E9E9E;
transition: all .3s;
}
.active-trip-moduleDay {
position: relative;
border: 0;
......@@ -929,4 +925,7 @@ export default {
line-height: 58px;
opacity: 0;
}
#setZoom>div{
zoom: calc(100 / 1000)
}
</style>
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