Commit d8894949 authored by youjie's avatar youjie

详情页 日期选项

parent 477b3278
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
" class="bg-white" v-if=" " class="bg-white" v-if="
(currentHeight > navs[0].top + 100 && $q.platform.is.desktop) || (currentHeight > navs[0].top + 100 && $q.platform.is.desktop) ||
(currentHeight > priceListHeight && (currentHeight > priceListHeight &&
currentHeight < navs[0].top && currentHeight < navs[0].top
$q.platform.is.mobile) )||$q.platform.is.mobile
" :style="{ transform: stickyHeight }"> " :style="{ transform: $q.platform.is.mobile?'':stickyHeight }">
<div style="max-width: 1200px; margin-left: auto; margin-right: auto" <div style="max-width: 1200px; margin-left: auto; margin-right: auto"
:class="{ 'q-px-md': $q.screen.width < 1220 }" class="q-py-sm row items-center"> :class="{ 'q-px-md': $q.screen.width < 1220 }" class="q-py-sm row items-center">
<span class="col product-price text-subtitle1 text-weight-bold" style="text-align: left" <span class="col product-price text-subtitle1 text-weight-bold" style="text-align: left"
...@@ -108,7 +108,8 @@ ...@@ -108,7 +108,8 @@
border-top: 1px solid #eee; border-top: 1px solid #eee;
box-shadow: 0 2px 8px rgb(0 0 0 / 20%); box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
z-index: 999; z-index: 999;
" v-if="currentHeight > priceListHeight + 800 && $q.platform.is.mobile" :style="{ transform: stickyHeight }"> " v-if="currentHeight > priceListHeight + 800 && $q.platform.is.mobile"
:style="{ transform: stickyHeight }">
<q-tabs v-model="tab" dense class="text-grey" active-color="primary" indicator-color="primary" align="left" <q-tabs v-model="tab" dense class="text-grey" active-color="primary" indicator-color="primary" align="left"
narrow-indicator> narrow-indicator>
<q-tab v-for="(x, i) in navs" :key="i" @click="goScrollHandler(x.top + 20)" :name="x.display" <q-tab v-for="(x, i) in navs" :key="i" @click="goScrollHandler(x.top + 20)" :name="x.display"
...@@ -119,15 +120,20 @@ ...@@ -119,15 +120,20 @@
<div style="max-width: 1200px; margin-left: auto; margin-right: auto"> <div style="max-width: 1200px; margin-left: auto; margin-right: auto">
<div class="text-h6">選擇方案</div> <div class="text-h6">選擇方案</div>
<div class="rounded-borders bg-white q-pa-md q-mt-md" v-if="$q.platform.is.mobile"> <div class="rounded-borders bg-white q-pa-md q-mt-md" v-if="$q.platform.is.mobile">
<q-field class="q-mt-md" stack-label label="選擇日期、選項" standout dense> <div style="background: rgba(0, 0, 0, 0.05);border-radius: 4px;"
<div class="self-center full-width no-outline" tabindex="0"> class="q-mt-md q-pa-sm relative"
@click="showDate = !showDate">
<div class="fz12 absolute" style="left: 10px;top:5px">選擇日期、選項</div>
<div class="fz14 self-center full-width no-outline q-pt-md " tabindex="0">
{{ currentPrice.startDate }} {{ currentPrice.startDate }}
</div> </div>
<q-popup-proxy ref="qDateProxy"> </div>
<calendar v-loading="calLoading" class="bg-white q-pa-md" :priceList="dataList.priceList" <popup mode="top" v-model="showDate">
<q-card flat class="rounded-borders q-py-md">
<calendar v-loading="calLoading" class="bg-white q-pa-md" :tcid="msg.tcid" :priceList="dataList.priceList" :dataList="dataList"
@change="changeChosenDateHandler" ref="calendarMobile"></calendar> @change="changeChosenDateHandler" ref="calendarMobile"></calendar>
</q-popup-proxy> </q-card>
</q-field> </popup>
<order-preview :travel="dataList" :price="currentPrice" @reset="resetHandler" <order-preview :travel="dataList" :price="currentPrice" @reset="resetHandler"
@changeCity="changeCityHandler" v-if="currentPrice && currentPrice.startDate"></order-preview> @changeCity="changeCityHandler" v-if="currentPrice && currentPrice.startDate"></order-preview>
</div> </div>
...@@ -463,6 +469,7 @@ ...@@ -463,6 +469,7 @@
import block from "src/components/trip/block/index"; import block from "src/components/trip/block/index";
import Flight from "src/components/trip/flight.vue"; import Flight from "src/components/trip/flight.vue";
import NoneData from "src/components/common/noneData.vue"; import NoneData from "src/components/common/noneData.vue";
import popup from "../components/props/index";
export default { export default {
props: [], props: [],
data() { data() {
...@@ -596,6 +603,7 @@ ...@@ -596,6 +603,7 @@
moreDays: 0, moreDays: 0,
calLoading: false, calLoading: false,
loadCount: 0, loadCount: 0,
showDate: true,
}; };
}, },
components: { components: {
...@@ -608,6 +616,7 @@ ...@@ -608,6 +616,7 @@
block, block,
Flight, Flight,
NoneData, NoneData,
popup
}, },
watch: { watch: {
days: { days: {
...@@ -729,7 +738,7 @@ ...@@ -729,7 +738,7 @@
let temp = this.getScroll().top; let temp = this.getScroll().top;
this.stickyHeight = document.querySelector(".q-header--hidden") ? this.stickyHeight = document.querySelector(".q-header--hidden") ?
"translateY(0px)" : "translateY(0px)" :
"translateY(45px)"; "translateY(54px)";
this.currentHeight = temp; this.currentHeight = temp;
if ( if (
this.videoPosition > 0 && this.videoPosition > 0 &&
...@@ -832,7 +841,8 @@ ...@@ -832,7 +841,8 @@
} }
} }
if (this.$q.platform.is.mobile) { if (this.$q.platform.is.mobile) {
this.$refs.qDateProxy.hide();
// this.$refs.qDateProxy.hide();
} }
this.$forceUpdate(); this.$forceUpdate();
this.$nextTick(() => { this.$nextTick(() => {
...@@ -973,6 +983,11 @@ ...@@ -973,6 +983,11 @@
} }
}); });
} }
if(this.$q.platform.is.mobile){
setTimeout(() => {
this.showDate = false;
}, 100);
}
} catch (error) {} } catch (error) {}
this.$q.loading.hide(); this.$q.loading.hide();
this.loadCount++ this.loadCount++
......
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