@ -77,8 +77,8 @@
< u -popup v-model ="scenic_spot" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.product .spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . product . spec [ type_index ] . original_price } } < / view >
< lf -price :price ="goods_detai.spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . spec [ type_index ] . original_price } } < / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
开始时间 : { { choose_date } }
@ -86,7 +86,7 @@
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.product. spec" :key="index" @click="chooseType(index)" > {{ item.name }} < / view >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.spec" :key="index" @click="chooseType(index)" > {{ item.product_spec .name }} < / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
@ -166,8 +166,8 @@
< u -popup v-model ="hotel" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.product .spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . product . spec [ type_index ] . original_price } } < / view >
< lf -price :price ="goods_detai.spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . spec [ type_index ] . original_price } } < / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
酒店住房日期 : { { live_date } } ~ { { leave_date } }
@ -175,7 +175,7 @@
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.product. spec" :key="index" @click="chooseType(index)" > {{ item.name }} < / view >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.spec" :key="index" @click="chooseType(index)" > {{ item.product_spec .name }} < / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
@ -270,16 +270,92 @@
< u -popup v-model ="travel_route" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.product. spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . product . spec [ type_index ] . original_price } } < / view >
< lf -price :price ="goods_detail.spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . spec [ type_index ] . original_price } } < / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
套餐类型 : { { goods_detail . product . spec [ type_index ] . name } }
套餐类型 : { { goods_detail . spec [ type_index ] . product_spec . name } }
< / view >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.product.spec" @click="chooseType(index)" :key ="index" > {{ item.name }} < / view >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.spec" @click="chooseType(index)" :key ="index" > {{ item.product_spec.name }} < / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
< view class = "lf-row-between" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 出行日期 < / text >
< / view >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-center" >
< text class = "lf-font-28 lf-color-gray" > 开始时间 < / text >
< / view >
< view class = "lf-flex" >
< picker mode = "date" :value ="go_date" @change ="goChange" >
<!-- < view class = "lf-color-555 lf-text-right" style = "width: 400rpx;" > { { '请选择收货时间...' } } < / view > -- >
< view class = "lf-color-333 lf-text-right lf-font-28" style = "width: 400rpx;" > { { go_date } } < / view >
< / picker >
< text class = "lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10" > < / text >
< / view >
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< button class = "choose_btn" @click ="toAddOrder()" > 立即购买 < / button >
< / view >
< / view >
< / u - p o p u p >
<!-- 车队 -- >
< u -popup v-model ="car" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . spec [ type_index ] . original_price } } < / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
套餐类型 : { { goods_detail . spec [ type_index ] . product_spec . name } }
< / view >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.spec" @click="chooseType(index)" :key ="index" > {{ item.name }} < / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
< view class = "lf-row-between" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 出行日期 < / text >
< / view >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-center" >
< text class = "lf-font-28 lf-color-gray" > 开始时间 < / text >
< / view >
< view class = "lf-flex" >
< picker mode = "date" :value ="go_date" @change ="goChange" >
<!-- < view class = "lf-color-555 lf-text-right" style = "width: 400rpx;" > { { '请选择收货时间...' } } < / view > -- >
< view class = "lf-color-333 lf-text-right lf-font-28" style = "width: 400rpx;" > { { go_date } } < / view >
< / picker >
< text class = "lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10" > < / text >
< / view >
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< button class = "choose_btn" @click ="toAddOrder()" > 立即购买 < / button >
< / view >
< / view >
< / u - p o p u p >
<!-- 单项 -- >
< u -popup v-model ="single" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.spec[type_index].price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . spec [ type_index ] . original_price } } < / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
套餐类型 : { { goods_detail . spec [ type_index ] . product_spec . name } }
< / view >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(item,index) of goods_detail.spec" @click="chooseType(index)" :key ="index" > {{ item.product_spec.name }} < / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
@ -375,7 +451,9 @@
go_date : '请选择开始时间' ,
back_date : '请选择回程日期' ,
/ / 餐 厅
canteen : false
canteen : false ,
car : false ,
single : false ,
}
} ,
components : { zwyCalendar } ,
@ -403,8 +481,18 @@
}
} ,
pickerChange ( e ) {
this . choose_date = e . detail . value ;
console . log ( e )
var nowTime = new Date ( new Date ( ) . toLocaleDateString ( ) ) . getTime ( ) ;
let oldTime = new Date ( new Date ( e . detail . value ) . toLocaleDateString ( ) ) . getTime ( ) ;
if ( oldTime < nowTime ) {
this . $msg ( '请选择正确的开始时间!' ) ;
var date1 = new Date ( ) ;
var date2 = new Date ( date1 ) ;
date2 . setDate ( date1 . getDate ( ) ) ;
this . choose_date = this . $shared . recordTime ( date2 , '-' , 'date' )
return
} else {
this . choose_date = e . detail . value ;
}
} ,
arriveChange ( e ) {
let live_date = new Date ( new Date ( this . live_date ) . toLocaleDateString ( ) ) . getTime ( ) ;
@ -423,6 +511,18 @@
} ,
goChange ( e ) {
this . go_date = e . detail . value ;
/ / v a r n o w T i m e = n e w D a t e ( n e w D a t e ( ) . t o L o c a l e D a t e S t r i n g ( ) ) . g e t T i m e ( ) ;
/ / l e t o l d T i m e = n e w D a t e ( n e w D a t e ( e . d e t a i l . v a l u e ) . t o L o c a l e D a t e S t r i n g ( ) ) . g e t T i m e ( ) ;
/ / i f ( o l d T i m e < n o w T i m e ) {
/ / t h i s . $ m s g ( ' 请 选 择 正 确 的 开 始 时 间 ! ' ) ;
/ / v a r d a t e 1 = n e w D a t e ( ) ;
/ / v a r d a t e 2 = n e w D a t e ( d a t e 1 ) ;
/ / d a t e 2 . s e t D a t e ( d a t e 1 . g e t D a t e ( ) ) ;
/ / t h i s . g o _ d a t e = t h i s . $ s h a r e d . r e c o r d T i m e ( d a t e 2 , ' - ' , ' d a t e ' )
/ / r e t u r n
/ / } e l s e {
/ / t h i s . g o _ d a t e = e . d e t a i l . v a l u e ;
/ / }
} ,
backChange ( e ) {
this . back_date = e . detail . value ;
@ -472,6 +572,12 @@
} else if ( type == 3 ) {
/ / 餐 厅
this . canteen = true ;
} else if ( type == 4 ) {
/ / 车 队
this . car = true ;
} else if ( type == 5 ) {
/ / 单 项
this . single = true ;
}
} ,
@ -537,8 +643,8 @@
let goods_id = this . goods_detail . id ;
let godds_type = this . goods_detail . product . type ;
let enter_time = this . choose_date ;
let spec_id = this . goods_detail . product . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . product . spec [ this . type_index ] . name ;
let spec_id = this . goods_detail . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . spec [ this . type_index ] . product_spec . name ;
this . $url ( '/pages/order/confirm_order?goods_id=' + goods_id + '&spec_id=' + spec_id + '&goods_type=' + godds_type + '&enter_time=' + enter_time + '&goods_typetext=' + type_text ) ;
} else {
this . $msg ( '请选择正确的开始时间!' ) ;
@ -595,8 +701,8 @@
console . log ( arrival_time )
let goods_id = this . goods_detail . id ;
let godds_type = this . goods_detail . product . type ;
let spec_id = this . goods_detail . product . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . product . spec [ this . type_index ] . name ;
let spec_id = this . goods_detail . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . spec [ this . type_index ] . product_spec . name ;
/ / 酒 店
let check_in_time = this . live_date ;
let check_out_time = this . leave_date ;
@ -604,7 +710,7 @@
let arrival_time = arrival_timedate ;
this . $url ( '/pages/order/confirm_order?goods_id=' + goods_id + '&spec_id=' + spec_id + '&goods_type=' + godds_type + '&check_in_time=' + check_in_time + '&goods_typetext=' + type_text + '&check_out_time=' + check_out_time + '&arrival_time=' + arrival_time + '&totalLive=' + totalLive ) ;
}
} else if ( this . goods_detail . product . type == 0 ) {
} else if ( this . goods_detail . product . type == 0 || this . goods_detail . product . type == 4 || this . goods_detail . product . type == 5 ) {
if ( this . go_date != '请选择开始时间' ) {
let date_compare = this . compareDate ( this . go_date ) ;
console . log ( date_compare )
@ -612,8 +718,8 @@
let goods_id = this . goods_detail . id ;
let godds_type = this . goods_detail . product . type ;
let departure_time = this . go_date ;
let spec_id = this . goods_detail . product . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . product . spec [ this . type_index ] . name ;
let spec_id = this . goods_detail . spec [ this . type_index ] . id ;
let type_text = this . goods_detail . spec [ this . type_index ] . product_spec . name ;
this . $url ( '/pages/order/confirm_order?goods_id=' + goods_id + '&spec_id=' + spec_id + '&goods_type=' + godds_type + '&departure_time=' + departure_time + '&goods_typetext=' + type_text ) ;
} else {
this . $msg ( '请选择正确的开始时间!' ) ;