Commit e9ce4d8d authored by youjie's avatar youjie

优化

parent aea4f8d4
...@@ -101,15 +101,16 @@ ...@@ -101,15 +101,16 @@
<span class="fz13">{{subItem.Currency }}</span> <span class="fz13">{{subItem.Currency }}</span>
<!-- style="border-bottom: 1px dotted #f44336;" <!-- style="border-bottom: 1px dotted #f44336;"
@click="getDiDaPriceConfirm(index,indexs,subItem)" --> @click="getDiDaPriceConfirm(index,indexs,subItem)" -->
<span class="text-red text-weight-bold q-px-sm" <!-- v-loading="index==currentIndex&&indexs==currentSubIndex&&confirmLoading" -->
<span class="text-red text-weight-bold q-px-sm" v-if="subItem&&subItem.PriceList&&subItem.PriceList.length"
:class="{'fz28':$q.platform.is.desktop}" :class="{'fz28':$q.platform.is.desktop}"
@click="getDiDaPriceConfirm(index,indexs,subItem)" @click="getDiDaPriceConfirm(index,indexs,subItem)"
v-loading="index==currentIndex&&indexs==currentSubIndex&&confirmLoading"> >
{{ subItem.PriceList&&subItem.PriceList.length?getPrice(subItem.PriceList[0].Price):getPrice(subItem.TotalPrice) }} {{ subItem.PriceList&&subItem.PriceList.length?getPrice(subItem.PriceList[0].Price):getPrice(subItem.TotalPrice) }}
<span v-if="subItem.PriceList&&subItem.PriceList.length" <span v-if="subItem.PriceList&&subItem.PriceList.length"
style="font-size:12px;color:#888888">/間</span> style="font-size:12px;color:#888888">/間</span>
</span> </span>
<!-- <span>{{getPrice(subItem.chargeableRateInfoPerPersonForANightBySetCurrency)}}</span> -->
</div> </div>
<div :class="{'row justify-end':$q.platform.is.mobile}"> <div :class="{'row justify-end':$q.platform.is.mobile}">
<q-btn color="primary" :size="$q.platform.is.desktop?'md':'sm'" label="立即預訂" unelevated <q-btn color="primary" :size="$q.platform.is.desktop?'md':'sm'" label="立即預訂" unelevated
...@@ -124,9 +125,6 @@ ...@@ -124,9 +125,6 @@
class="absolute q-px-sm text-white" class="absolute q-px-sm text-white"
:class="itemp.MealAmount==0?'bg-dark':'bg-green'" :class="itemp.MealAmount==0?'bg-dark':'bg-green'"
style="left: 0;top:0;border-top-right-radius: 5px;border-bottom-right-radius: 5px;"> style="left: 0;top:0;border-top-right-radius: 5px;border-bottom-right-radius: 5px;">
<!-- <span class="text-red">{{subItem.Currency }}
{{getPrice(itemp.Price) }}
</span> -->
{{getMealtype(itemp.MealType)}} {{getMealtype(itemp.MealType)}}
{{itemp.MealAmount>0?('×'+itemp.MealAmount+'份'):''}} {{itemp.MealAmount>0?('×'+itemp.MealAmount+'份'):''}}
</span> </span>
...@@ -268,7 +266,7 @@ ...@@ -268,7 +266,7 @@
return totelPrice; return totelPrice;
}, },
getPrice(price) { getPrice(price) {
return Math.ceil(price); return price //Math.ceil(price);
}, },
getDiDaPriceConfirm(index, subIndex, item) { getDiDaPriceConfirm(index, subIndex, item) {
this.currentIndex = index; this.currentIndex = index;
...@@ -338,10 +336,6 @@ ...@@ -338,10 +336,6 @@
images, images,
}); });
}, },
getPrice2(price){
if(this.SimilarObj.JapanIncrease)
return Math.ceil(price / this.SimilarObj.JapanIncrease)
},
//获取餐型 //获取餐型
getMealtype(mealtypeId) { getMealtype(mealtypeId) {
let mealtypeName = ""; let mealtypeName = "";
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
searchroomGroup:msg.searchroomGroup}" searchroomGroup:msg.searchroomGroup}"
Type="1" Type="1"
@change="changQuery" @change="changQuery"
@changeCity="changCity" @changeCity="changCity"></destination>
@clear="changQuery"></destination>
<div class="q-pt-sm cursor-pointer"> <div class="q-pt-sm cursor-pointer">
<div v-show="regionList.length" class="self-center no-outline text-s" <div v-show="regionList.length" class="self-center no-outline text-s"
tabindex="0" tabindex="0"
...@@ -745,10 +744,12 @@ export default { ...@@ -745,10 +744,12 @@ export default {
this.$emit('change', this.msg) this.$emit('change', this.msg)
}, },
changCity(y){ changCity(y){
// this.msg.CityCode2 = y.CityCode this.msg = {
this.msg.CityCode = y.CityCode ...this.msg,
this.msg.CityName = y.CityName ...y
this.resetQuery() }
this.$emit('change', this.msg)
// this.resetQuery()
this.getRegion(this.msg.CityCode) this.getRegion(this.msg.CityCode)
}, },
clickHandler(e) { clickHandler(e) {
......
...@@ -399,7 +399,7 @@ ...@@ -399,7 +399,7 @@
</template> </template>
</q-img> </q-img>
<div class="col column q-ml-xs"> <div class="col column q-ml-xs">
<q-img class="cursor-pointer" :src="images[1]" <q-img class="cursor-pointer" :src="images[1]?images[1]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(1)"> :ratio="16/9" @click="showImageHandler(1)">
<template v-slot:error> <template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark"> <div class="absolute-full flex flex-center bg-grey-3 text-dark">
...@@ -407,7 +407,7 @@ ...@@ -407,7 +407,7 @@
</div> </div>
</template> </template>
</q-img> </q-img>
<q-img class="q-mt-xs cursor-pointer" :src="images[2]" <q-img class="q-mt-xs cursor-pointer" :src="images[2]?images[2]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(2)"> :ratio="16/9" @click="showImageHandler(2)">
<template v-slot:error> <template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark"> <div class="absolute-full flex flex-center bg-grey-3 text-dark">
...@@ -417,7 +417,7 @@ ...@@ -417,7 +417,7 @@
</q-img> </q-img>
</div> </div>
<div class="col column q-ml-xs"> <div class="col column q-ml-xs">
<q-img class="cursor-pointer" :src="images[3]" <q-img class="cursor-pointer" :src="images[3]?images[3]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(3)"> :ratio="16/9" @click="showImageHandler(3)">
<template v-slot:error> <template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark"> <div class="absolute-full flex flex-center bg-grey-3 text-dark">
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
</div> </div>
</template> </template>
</q-img> </q-img>
<q-img class="q-mt-xs cursor-pointer" :src="images[4]" <q-img class="q-mt-xs cursor-pointer" :src="images[4]?images[4]:'../assets/img/errImg.png'"
:ratio="16/9" @click="showImageHandler(4)"> :ratio="16/9" @click="showImageHandler(4)">
<template v-slot:error> <template v-slot:error>
<div class="absolute-full flex flex-center bg-grey-3 text-dark"> <div class="absolute-full flex flex-center bg-grey-3 text-dark">
...@@ -1199,6 +1199,7 @@ export default { ...@@ -1199,6 +1199,7 @@ export default {
if (tempRetePlanList && tempRetePlanList.length > 0) { if (tempRetePlanList && tempRetePlanList.length > 0) {
newDataArray.push(qitem); newDataArray.push(qitem);
} }
}) })
tempData = newDataArray; tempData = newDataArray;
} }
...@@ -1236,8 +1237,11 @@ export default { ...@@ -1236,8 +1237,11 @@ export default {
methods: { methods: {
changeMsg(msg,item){ changeMsg(msg,item){
if(item){ if(item){
this.detaMsg.hotelId = item.Id this.detaMsg.hotelId = item.hotelId
this.msg.hotelId = item.Id this.msg = {
...this.msg,
...item,
}
this.MinPrice = item.Price this.MinPrice = item.Price
}else{ }else{
this.CityCode = msg.CityCode this.CityCode = msg.CityCode
...@@ -1526,7 +1530,6 @@ export default { ...@@ -1526,7 +1530,6 @@ export default {
const row = tempObj.RoomFacilityList.slice(startIndex, endIndex) const row = tempObj.RoomFacilityList.slice(startIndex, endIndex)
this.RoomFacilities.push(row) this.RoomFacilities.push(row)
} }
console.log(this.RoomFacilities,'----')
} }
// let description = tempObj.description.split('<br/>') // let description = tempObj.description.split('<br/>')
// this.hotelDetails.hotelDescription = [] // this.hotelDetails.hotelDescription = []
...@@ -1582,6 +1585,7 @@ export default { ...@@ -1582,6 +1585,7 @@ export default {
} }
}) })
}) })
if(item.images.length==0) item.imageList = this.images
}) })
this.DidaHotelRoomDetails = tempData; this.DidaHotelRoomDetails = tempData;
this.qRoomTypeList = tempData.qRoomTypeList?tempData.qRoomTypeList:[]; this.qRoomTypeList = tempData.qRoomTypeList?tempData.qRoomTypeList:[];
......
...@@ -270,9 +270,10 @@ export default { ...@@ -270,9 +270,10 @@ export default {
// }); // });
}else if(y.Type==2){ }else if(y.Type==2){
this.HotalMsg.KeyWords2 = '' this.HotalMsg.KeyWords2 = ''
this.HotalMsg.KeyWords = ''
this.HotalMsg.hotelId = y.Id this.HotalMsg.hotelId = y.Id
this.$emit('change', this.HotalMsg,y) this.$emit('change', this.HotalMsg,{hotelId:y.Id,Price:y.Price})
} }
this.showKeyWordsList = false this.showKeyWordsList = false
this.showSplitPannel = false this.showSplitPannel = false
...@@ -323,9 +324,12 @@ export default { ...@@ -323,9 +324,12 @@ export default {
this.loading2 = false this.loading2 = false
}) })
}, },
getHotalList(type){ getHotalList(type,cit){
let msg = JSON.parse(JSON.stringify(this.HotalMsg)) let msg = JSON.parse(JSON.stringify(this.HotalMsg))
if(this.KeyWords3) msg.KeyWords = this.KeyWords3 // if(this.KeyWords3) msg.KeyWords = this.KeyWords3
if(!type) {
msg.hotelId = ''
} if(cit) msg.KeyWords = ''
this.apipost( this.apipost(
"dmc_post_B2BAndB2CGetDidaHotelPage",msg, "dmc_post_B2BAndB2CGetDidaHotelPage",msg,
res => { res => {
...@@ -373,8 +377,7 @@ export default { ...@@ -373,8 +377,7 @@ export default {
// this.HotalMsg.hotelId = '' // this.HotalMsg.hotelId = ''
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD") this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD") this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
console.log(this.HotalMsg,'------') if(!type&&this.Type>0||type&&this.Type) this.$emit('change',this.HotalMsg)
if(!type&&this.Type>0) this.$emit('change',this.HotalMsg)
return return
this.showSplitPannel = true this.showSplitPannel = true
this.showKeyWordsList = false this.showKeyWordsList = false
...@@ -404,7 +407,7 @@ export default { ...@@ -404,7 +407,7 @@ export default {
searchBlurHandler(type){ searchBlurHandler(type){
}, },
searchChangeHandler(type){ searchChangeHandler(type,cit){
setTimeout(()=>{ setTimeout(()=>{
if(!type&&(!this.HotalMsg.KeyWords||this.HotalMsg.KeyWords=='')&&(!this.KeyWords3||this.KeyWords3=='')) { if(!type&&(!this.HotalMsg.KeyWords||this.HotalMsg.KeyWords=='')&&(!this.KeyWords3||this.KeyWords3=='')) {
this.loading = false this.loading = false
...@@ -412,7 +415,7 @@ export default { ...@@ -412,7 +415,7 @@ export default {
this.showSplitPannel = false this.showSplitPannel = false
if(this.Type>0) this.$emit('change', this.HotalMsg) if(this.Type>0) this.$emit('change', this.HotalMsg)
return return
}else if(type&&(!this.HotalMsg.KeyWords2||this.HotalMsg.KeyWords2=='')){ }else if(type&&(!this.HotalMsg.KeyWords2||this.HotalMsg.KeyWords2=='')&&(!this.HotalMsg.CityCode||this.HotalMsg.CityCode=='')){
this.loading = false this.loading = false
this.showKeyWordsList = false this.showKeyWordsList = false
if(this.Type>0) this.$emit('change', this.HotalMsg) if(this.Type>0) this.$emit('change', this.HotalMsg)
...@@ -423,7 +426,7 @@ export default { ...@@ -423,7 +426,7 @@ export default {
if(!type) { if(!type) {
if(!this.Type){ if(!this.Type){
this.loading = true this.loading = true
this.getHotalList() this.getHotalList(type,cit)
}else{ }else{
this.$emit('change', this.HotalMsg) this.$emit('change', this.HotalMsg)
} }
...@@ -439,15 +442,18 @@ export default { ...@@ -439,15 +442,18 @@ export default {
this.HotalMsg.CityCode = y.CityCode this.HotalMsg.CityCode = y.CityCode
this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD") this.HotalMsg.StartDate = this.HotalMsg.StartDate?this.HotalMsg.StartDate:date.formatDate(date.addToDate(new Date(), { days: 8 }), "YYYY/MM/DD")
this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD") this.HotalMsg.EndDate = this.HotalMsg.EndDate?this.HotalMsg.EndDate:date.formatDate(date.addToDate(new Date(), { days: 9}), "YYYY/MM/DD")
this.HotalMsg.KeyWords2 = y.CityName // this.HotalMsg.KeyWords2 = y.CityName
if(this.Type>0) { if(this.Type>0) {
this.HotalMsg.KeyWords2 = '' this.HotalMsg.KeyWords2 = ''
this.HotalMsg.KeyWords = ''
this.$emit('changeCity', this.HotalMsg) this.$emit('changeCity', this.HotalMsg)
this.showSplitPannel = false this.showSplitPannel = false
// this.searchChangeHandler(1) // this.searchChangeHandler(1)
}else{ }else{
// this.HotalMsg.KeyWords = '' // this.HotalMsg.KeyWords = ''
this.searchChangeHandler(1)
this.searchChangeHandler(0,1)
// this.CommonJump('/searchdida', { // this.CommonJump('/searchdida', {
// ...this.HotalMsg // ...this.HotalMsg
// }); // });
......
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