Commit dcb9b670 authored by zhengke's avatar zhengke

修改

parent 9ed4df20
...@@ -320,7 +320,7 @@ ...@@ -320,7 +320,7 @@
<div class="jz_LineDetail"> <div class="jz_LineDetail">
<view class="jz_TopImg"> <view class="jz_TopImg">
<swiper indicator-dots :autoplay="false" :interval="1000" style="height:100%;"> <swiper indicator-dots :autoplay="false" :interval="1000" style="height:100%;">
<block v-for="(item,cindex) in getCoverImg(dataList.imgCover)" wx:key="cindex"> <block v-for="(item,cindex) in getCoverImg(dataList.imgCover)" :key="cindex">
<swiper-item> <swiper-item>
<!--<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url" <!--<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url"
:autoplay="false" loop muted show-play-btn :enable-progress-gesture="true" :autoplay="false" loop muted show-play-btn :enable-progress-gesture="true"
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
</span> </span>
</view> </view>
<view style="display:flex;overflow-x: auto;"> <view style="display:flex;overflow-x: auto;">
<view class="jz_StartList" v-for="item in dataList.priceList" @click="getDayInfo(item)"> <view class="jz_StartList" v-for="(item,pindex) in dataList.priceList" @click="getDayInfo(item)" :key="pindex">
<view class="jz_StartTop">{{getMonth(item.startDate)}}{{item.remainNum}}</view> <view class="jz_StartTop">{{getMonth(item.startDate)}}{{item.remainNum}}</view>
<view class="jz_StartHoubu"> <view class="jz_StartHoubu">
{{item.isSubstitution==1?'可候补':'不可候补'}} {{item.isSubstitution==1?'可候补':'不可候补'}}
...@@ -419,20 +419,20 @@ ...@@ -419,20 +419,20 @@
</span> </span>
<view class="jz_TripMain"> <view class="jz_TripMain">
<view class="jz_TripLine"></view> <view class="jz_TripLine"></view>
<view v-for="(item,index) in dataList.dayList" wx:key="index"> <view v-for="(item,index) in dataList.dayList" :key="index">
<view class="jz_TripTitle"> <view class="jz_TripTitle">
<view class="jz_TripLeft">第{{getDays(index+1)}}天</view> <view class="jz_TripLeft">第{{getDays(index+1)}}天</view>
<view class="jz_TripRight"></view> <view class="jz_TripRight"></view>
</view> </view>
<view class="jz_RightInner"> <view class="jz_RightInner">
<view v-for="(subItem,SubIndex) in item.dayArray" v-if="subItem.type==7" wx:key="SubIndex"> <view v-for="(subItem,SubIndex) in item.dayArray" v-if="subItem.type==7" :key="SubIndex">
<view class="jz_Place"> <view class="jz_Place">
<view class="jz_ComDian"></view> <view class="jz_ComDian"></view>
<text>{{subItem.childItem.title}}</text> <text>{{subItem.childItem.title}}</text>
</view> </view>
</view> </view>
<template v-for="(subItem,index2) in item.dayArray" v-if="subItem.type==2" wx:key="index2"> <template v-for="(subItem,index2) in item.dayArray" v-if="subItem.type==2">
<view class="jz_ImgDiv"> <view class="jz_ImgDiv" :key="index2">
<img mode="aspectFill" :src="subItem.childItem.imaArray[0].url" alt=""> <img mode="aspectFill" :src="subItem.childItem.imaArray[0].url" alt="">
</view> </view>
<view class="jz_Place" style="align-items: center;"> <view class="jz_Place" style="align-items: center;">
...@@ -453,16 +453,16 @@ ...@@ -453,16 +453,16 @@
</template> </template>
<view class="jz_Place">温馨提示</view> <view class="jz_Place">温馨提示</view>
<view class="jz_Rermark"> <view class="jz_Rermark">
<template v-for="(subItem,sIndex) in item.dayArray" v-if="subItem.type==6" wx:key="sIndex"> <template v-for="(subItem,sIndex) in item.dayArray" v-if="subItem.type==6">
{{subItem.childItem.descriptionText}} <text :key="sIndex">{{subItem.childItem.descriptionText}}</text>
</template> </template>
</view> </view>
<view class="jz_Place"> <view class="jz_Place">
<view class="jz_ComDian"></view> <view class="jz_ComDian"></view>
<text class="jz_Canyin">餐饮</text> <text class="jz_Canyin">餐饮</text>
<text class="jz_CanInner"> <text class="jz_CanInner">
<template v-for="(subItem,sIndex2) in item.dayArray" v-if="subItem.type==4" wx:key="sIndex2"> <template v-for="(subItem,sIndex2) in item.dayArray" v-if="subItem.type==4">
<text style="margin-right:20px;" v-if="subItem.childItem.useDinnerType=='1'">{{subItem.childItem.dinnerName}}</text> <text style="margin-right:20px;" :key="sIndex2" v-if="subItem.childItem.useDinnerType=='1'">{{subItem.childItem.dinnerName}}</text>
<text style="margin-right:20px;" v-if="subItem.childItem.useDinnerType=='2'">{{subItem.childItem.dinnerName}}</text> <text style="margin-right:20px;" v-if="subItem.childItem.useDinnerType=='2'">{{subItem.childItem.dinnerName}}</text>
<text v-if="subItem.childItem.useDinnerType=='3'">{{subItem.childItem.dinnerName}}</text> <text v-if="subItem.childItem.useDinnerType=='3'">{{subItem.childItem.dinnerName}}</text>
</template> </template>
...@@ -472,8 +472,8 @@ ...@@ -472,8 +472,8 @@
<view class="jz_ComDian"></view> <view class="jz_ComDian"></view>
<text class="jz_Canyin">酒店</text> <text class="jz_Canyin">酒店</text>
<text class="jz_CanInner"> <text class="jz_CanInner">
<template v-for="(subItem,sIndex3) in item.dayArray" v-if="subItem.type==3" wx:key="sIndex3"> <template v-for="(subItem,sIndex3) in item.dayArray" v-if="subItem.type==3">
<text>{{subItem.childItem.hotelName}}<text v-if="index!=dataList.dayList.length-1" style="margin:0 5px;">/</text></text> <text :key="sIndex3">{{subItem.childItem.hotelName}}<text v-if="index!=dataList.dayList.length-1" style="margin:0 5px;">/</text></text>
</template> </template>
<text v-if="index!=dataList.dayList.length-1">或同级</text> <text v-if="index!=dataList.dayList.length-1">或同级</text>
</text> </text>
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
z-index: 999; z-index: 999;
} }
.jz_OrderNow { .jz_OrderReNow {
width: 190rpx; width: 150rpx;
height: 80rpx; height: 80rpx;
background-color: #111111; background-color: #111111;
text-align: center; text-align: center;
...@@ -96,19 +96,19 @@ ...@@ -96,19 +96,19 @@
<view class="jz_ReseOrder"> <view class="jz_ReseOrder">
<view class="jz_ReDix"> <view class="jz_ReDix">
<view class="jz_RedixTitle">成人:</view> <view class="jz_RedixTitle">成人:</view>
<u-number-box v-model="orderMsg.crCount" :input-width="300" :input-height="60"></u-number-box> <u-number-box v-model="orderMsg.crCount" :input-width="300" :input-height="60" @change="calccrCount()"></u-number-box>
</view> </view>
<view class="jz_ReDix"> <view class="jz_ReDix">
<view class="jz_RedixTitle">儿童不占床:</view> <view class="jz_RedixTitle">儿童不占床:</view>
<u-number-box v-model="orderMsg.etbzcCount" :input-width="300" :input-height="60"></u-number-box> <u-number-box v-model="orderMsg.etbzcCount" :input-width="300" :input-height="60" @change="etbzcChange()"></u-number-box>
</view> </view>
<view class="jz_ReDix"> <view class="jz_ReDix">
<view class="jz_RedixTitle">儿童占床:</view> <view class="jz_RedixTitle">儿童占床:</view>
<u-number-box v-model="orderMsg.etzc" :input-width="300" :input-height="60"></u-number-box> <u-number-box v-model="orderMsg.etzc" :input-width="300" :input-height="60" @change="etzcChange()"></u-number-box>
</view> </view>
<view class="jz_ReDix"> <view class="jz_ReDix">
<view class="jz_RedixTitle">婴儿:</view> <view class="jz_RedixTitle">婴儿:</view>
<u-number-box v-model="orderMsg.yeCount" :input-width="300" :input-height="60"></u-number-box> <u-number-box v-model="orderMsg.yeCount" :input-width="300" :input-height="60" @change="yeChange()"></u-number-box>
</view> </view>
</view> </view>
<view class="jz_OrderDiv"> <view class="jz_OrderDiv">
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
<text style="color:#6E6E6E;font-size:24rpx;">共计2人</text> <text style="color:#6E6E6E;font-size:24rpx;">共计2人</text>
</view> </view>
<view style="display:flex;margin-top:-2px;"> <view style="display:flex;margin-top:-2px;">
<view class="jz_OrderNow" @click="goPay()">去支付</view> <view class="jz_OrderReNow" @click="goPay()">下单</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -140,49 +140,54 @@ ...@@ -140,49 +140,54 @@
etCount:0 etCount:0
}, },
zaoniao:0,
price:0,
currentPriceInfo: {} currentPriceInfo: {}
}; };
}, },
created() { created() {
}, },
onLoad(option) { onLoad(option) {
if (option.currentPriceInfo) { if (option.currentPriceInfo) {
this.currentPriceInfo = JSON.parse(option.currentPriceInfo) this.currentPriceInfo = JSON.parse(option.currentPriceInfo);
this.calcMoney();
} }
}, },
watch: {
orderMsg: {
handler(n, o) {
this.calcMoney()
},
deep: true,
price:0
},
},
methods: { methods: {
changeChenRen() { //改变成人
calccrCount(e){
console.log(e);
this.orderMsg.crCount = e.value;
this.calcMoney();
},
//改变儿童不占床
etbzcChange(e){
this.orderMsg.etbzcCount = e.value;
this.calcMoney();
},
//改变儿童占床
etzcChange(e){
this.orderMsg.etzc = e.value;
this.calcMoney();
},
//改变婴儿
yeChange(e){
this.orderMsg.yeCount = e.value;
this.calcMoney();
}, },
//计算价格 //计算价格
calcMoney() { calcMoney() {
console.log('进入'); this.orderMsg.etCount = parseInt(this.orderMsg.etbzcCount) + parseInt(this.orderMsg.etzc);
this.orderMsg.etCount = this.orderMsg.etbzcCount + this.orderMsg.etzc;
let money = this.currentPriceInfo.b2BMemberPrice * this.orderMsg.crCount let money = this.currentPriceInfo.b2BMemberPrice * this.orderMsg.crCount
money += this.currentPriceInfo.b2BMemberPrice * this.orderMsg.etCount money += this.currentPriceInfo.b2BMemberPrice * this.orderMsg.etCount
money += this.currentPriceInfo.babyChargePrice * this.orderMsg.etCount money += this.currentPriceInfo.babyChargePrice * this.orderMsg.etCount
money += this.currentPriceInfo.childNeedPrice * this.chosenObj.etzc money += this.currentPriceInfo.childNeedPrice * this.orderMsg.etzc
if (this.chosenObj.etbzcCount > 0) if (this.orderMsg.etbzcCount > 0)
money -= this.currentPriceInfo.childNoNeedPrice * this.chosenObj.etbzcCount money -= this.currentPriceInfo.childNoNeedPrice * this.orderMsg.etbzcCount
money += this.currentPriceInfo.babyPrice * this.orderMsg.yeCount
money += this.currentPriceInfo.babyPrice * this.chosenObj.yeCount let sumCount = parseInt(this.orderMsg.crCount) + parseInt(this.orderMsg.etCount)
let sumCount = this.chosenObj.crCount + this.chosenObj.etCount
money += this.currentPriceInfo.visaPrice * sumCount money += this.currentPriceInfo.visaPrice * sumCount
money += this.currentPriceInfo.otherPrice * sumCount money += this.currentPriceInfo.otherPrice * sumCount
if (this.currentPriceInfo.discountPric && this.currentPriceInfo.discountPric > 0) { if (this.currentPriceInfo.discountPric && this.currentPriceInfo.discountPric > 0) {
this.zaoniao = this.currentPriceInfo.discountPrice * sumCount this.zaoniao = this.currentPriceInfo.discountPrice * sumCount
} }
......
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