@ -38,7 +38,7 @@
< / view >
< / view >
<!-- 景区类型 -- >
<!-- 景区类型 -- >
< view v-if ="goods_detail.product.extends && goods_detail.product && goods_detail.product.type == 2" >
< view v-if ="goods_detail.product.extends && goods_detail.product && goods_detail.product.type == 2" >
< view class = "goods-detail" @click ="openMap(goods_detail.product.extends.field_2_address,goods_detail.product.extends.field_2_latitude,goods_detail.product.extends.field_2_longitude)" >
< view class = "goods-detail" v-if ="goods_detail.product.extends.field_2_name && goods_detail.product.extends.field_2_address" @click ="openMap(goods_detail.product.extends.field_2_address,goods_detail.product.extends.field_2_latitude,goods_detail.product.extends.field_2_longitude)">
< view class = "lf-font-32 lf-font-bold lf-m-b-20" > { { goods_detail . product . extends . field_2_name } } < / view >
< view class = "lf-font-32 lf-font-bold lf-m-b-20" > { { goods_detail . product . extends . field_2_name } } < / view >
< view class = "lf-row-between" >
< view class = "lf-row-between" >
< view class = "lf-line-2 lf-font-28 lf-color-333" > { { goods_detail . product . extends . field_2_address } } < / view >
< view class = "lf-line-2 lf-font-28 lf-color-333" > { { goods_detail . product . extends . field_2_address } } < / view >
@ -77,23 +77,23 @@
< u -popup v-model ="scenic_spot" mode="bottom" :closeable="true" border-radius="20" >
< u -popup v-model ="scenic_spot" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . original_price } } < / view >
< lf -price :price ="goods_detail.product.spec[type_index].pr ice" > < / 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 >
< / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
入园时间 : 09 月23日
开始时间 : { { choose_date } }
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(i,index) of 2" @click="chooseType(index)" > 大床房 < / view >
< 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 >
< / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
< view class = "lf-m-t-30" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 入园 时间< / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 开始 时间< / text >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-center" >
< view class = "lf-row-center" >
< text class = "lf-font-28 lf-color-gray" > 入园 时间< / text >
< text class = "lf-font-28 lf-color-gray" > 开始 时间< / text >
< / view >
< / view >
< view class = "lf-flex" >
< view class = "lf-flex" >
< picker mode = "date" :value ="choose_date" @change ="pickerChange" >
< picker mode = "date" :value ="choose_date" @change ="pickerChange" >
@ -105,7 +105,7 @@
< / view >
< / view >
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< button class = "choose_btn" > 立即购买 < / button >
< button class = "choose_btn" @click ="toAddOrder()" > 立即购买 < / button >
< / view >
< / view >
< / view >
< / view >
< / u - p o p u p >
< / u - p o p u p >
@ -166,22 +166,22 @@
< u -popup v-model ="hotel" mode="bottom" :closeable="true" border-radius="20" >
< u -popup v-model ="hotel" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . original_price } } < / view >
< lf -price :price ="goods_detail.product.spec[type_index].pr ice" > < / 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 >
< / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
酒店住房日期 : 09 月22日 - 09 月27日
酒店住房日期 : { { live_date } } ~ { { leave_date } }
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(i,index) of 2" @click="chooseType(index)" > 大床房 < / view >
< 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 >
< / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
< view class = "lf-m-t-30" >
< view class = "lf-row-between" >
< view class = "lf-row-between" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 酒店住房日期 < / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 酒店住房日期 < / text >
< text class = "lf-font-24 lf-color-gray" > 共6 晚< / text >
< text class = "lf-font-24 lf-color-gray" v-if ="totalLive" > 共 {{ totalLive }} 晚 < / text >
< / view >
< / view >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-center" >
< view class = "lf-row-center" >
@ -233,7 +233,7 @@
< / view >
< / view >
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< button class = "choose_btn" > 立即购买 < / button >
< button class = "choose_btn" @click ="toAddOrder()" > 立即购买 < / button >
< / view >
< / view >
< / view >
< / view >
< / u - p o p u p >
< / u - p o p u p >
@ -270,26 +270,25 @@
< u -popup v-model ="travel_route" mode="bottom" :closeable="true" border-radius="20" >
< u -popup v-model ="travel_route" mode="bottom" :closeable="true" border-radius="20" >
< view class = "lf-p-32" >
< view class = "lf-p-32" >
< view class = "price lf-flex" >
< view class = "price lf-flex" >
< lf -price :price ="goods_detail.price" > < / l f - p r i c e >
< view class = "pop-price lf-m-l-20 lf-font-24" > ¥ { { goods_detail . original_price } } < / view >
< lf -price :price ="goods_detail.product.spec[type_index].pr ice" > < / 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 >
< / view >
< / view >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
< view class = "lf-font-24 lf-m-t-20 lf-color-555" >
套餐类型 : 奢玩云南6天 | 出行日期 : 09 月22日 - 09 月27日
套餐类型 : { { goods_detail . product . spec [ type_index ] . name } }
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 套餐类型 < / text >
< view class = "lf-m-t-30 choose-father" >
< view class = "lf-m-t-30 choose-father" >
< view class = "choose-span" :class ="type_index==index?'choose-active':''" v-for ="(i,index) of 2" @click="chooseType(index)" > 潮玩云南游6天 < / view >
< 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 >
< / view >
< / view >
< / view >
< view class = "lf-m-t-30" >
< view class = "lf-m-t-30" >
< view class = "lf-row-between" >
< view class = "lf-row-between" >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 出行日期 < / text >
< text class = "lf-font-32 lf-font-bold" style = "color: #131315;" > 出行日期 < / text >
< text class = "lf-font-24 lf-color-gray" > 共6晚 < / text >
< / view >
< / view >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-between list-item lf-m-t-20" style = "padding: 0!important;" >
< view class = "lf-row-center" >
< view class = "lf-row-center" >
< text class = "lf-font-28 lf-color-gray" > 出发 时间< / text >
< text class = "lf-font-28 lf-color-gray" > 开始 时间< / text >
< / view >
< / view >
< view class = "lf-flex" >
< view class = "lf-flex" >
< picker mode = "date" :value ="go_date" @change ="goChange" >
< picker mode = "date" :value ="go_date" @change ="goChange" >
@ -299,21 +298,9 @@
< text class = "lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10" > < / text >
< text class = "lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10" > < / text >
< / view >
< / view >
< / view >
< / view >
< view class = "lf-row-between list-item" 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 ="back_date" @change ="backChange" >
<!-- < 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;" > { { back_date } } < / view >
< / picker >
< text class = "lf-iconfont lf-icon-xiangyou lf-text-vertical lf-m-l-10" > < / text >
< / view >
< / view >
< / view >
< / view >
< view style = "margin-top: 60rpx;" >
< view style = "margin-top: 60rpx;" >
< button class = "choose_btn" > 立即购买 < / button >
< button class = "choose_btn" @click ="toAddOrder()" > 立即购买 < / button >
< / view >
< / view >
< / view >
< / view >
< / u - p o p u p >
< / u - p o p u p >
@ -350,7 +337,7 @@
< view class = "lf-m-t-1" > 分享 < / view >
< view class = "lf-m-t-1" > 分享 < / view >
< / button >
< / button >
< / view >
< / view >
< button class = "btn" @click ="toAddOrder " > 立即购买 < / button >
< button class = "btn" @click ="changePop(goods_detail.product.type) " > 立即购买 < / button >
< / view >
< / view >
<!-- 回到顶部 -- >
<!-- 回到顶部 -- >
<!-- < u -back -top :scroll-top ="pageScrollTop" : custom -style = " { background : ' rgba ( 51 , 51 51 , 0.3 ) ' } " : icon -style = " { color : ' # ffffff ' } " > < / u - b a c k - t o p > - - >
<!-- < u -back -top :scroll-top ="pageScrollTop" : custom -style = " { background : ' rgba ( 51 , 51 51 , 0.3 ) ' } " : icon -style = " { color : ' # ffffff ' } " > < / u - b a c k - t o p > - - >
@ -375,16 +362,17 @@
/ / 景 区 类 型 相 关
/ / 景 区 类 型 相 关
scenic_spot : false ,
scenic_spot : false ,
type_index : 0 ,
type_index : 0 ,
choose_date : '请选择入园 时间' ,
choose_date : '请选择开始 时间' ,
/ / 酒 店 相 关
/ / 酒 店 相 关
hotel : false ,
hotel : false ,
live_date : '请选择入住日期' ,
live_date : '请选择入住日期' ,
leave_date : '请选择离店日期' ,
leave_date : '请选择离店日期' ,
arrive_date : '请选择到店日期' ,
arrive_date : '请选择到店日期' ,
arrive_time : '请选择到店时间' ,
arrive_time : '请选择到店时间' ,
totalLive : '' , / / 住 宿 时 间
/ / 旅 游 路 线 相 关
/ / 旅 游 路 线 相 关
travel_route : false ,
travel_route : false ,
go_date : '请选择出发日期 ' ,
go_date : '请选择开始时间 ' ,
back_date : '请选择回程日期' ,
back_date : '请选择回程日期' ,
/ / 餐 厅
/ / 餐 厅
canteen : false
canteen : false
@ -405,6 +393,15 @@
}
}
} ,
} ,
methods : {
methods : {
compareDate ( val ) {
var nowTime = new Date ( new Date ( ) . toLocaleDateString ( ) ) . getTime ( ) ;
let oldTime = new Date ( new Date ( val ) . toLocaleDateString ( ) ) . getTime ( ) ;
if ( nowTime > oldTime ) {
return false ;
} else {
return true ;
}
} ,
pickerChange ( e ) {
pickerChange ( e ) {
this . choose_date = e . detail . value ;
this . choose_date = e . detail . value ;
console . log ( e )
console . log ( e )
@ -426,6 +423,9 @@
} ,
} ,
leaveChange ( e ) {
leaveChange ( e ) {
this . leave_date = e . detail . value ;
this . leave_date = e . detail . value ;
let live_date = new Date ( new Date ( this . live_date ) . toLocaleDateString ( ) ) . getTime ( ) ;
let leave_date = new Date ( new Date ( this . leave_date ) . toLocaleDateString ( ) ) . getTime ( ) ;
this . totalLive = parseInt ( Math . abs ( leave_date - live_date ) / 1000 / 60 / 60 / 24 ) ;
} ,
} ,
chooseType ( index ) {
chooseType ( index ) {
this . type_index = index ;
this . type_index = index ;
@ -498,8 +498,105 @@
} ,
} ,
/ / 跳 转 到 确 认 下 单 页 面
/ / 跳 转 到 确 认 下 单 页 面
toAddOrder ( ) {
toAddOrder ( ) {
let goods_id = this . goods_detail . id ;
this . $url ( '/pages/order/confirm_order?goods_id=' + goods_id ) ;
/ / 0 旅 游 路 线 1 酒 店 2 景 区 3 餐 厅
if ( this . goods_detail . product . type == 2 ) {
/ / 景 区
if ( this . choose_date != '请选择开始时间' ) {
let date_compare = this . compareDate ( this . choose_date ) ;
console . log ( date_compare )
if ( date_compare ) {
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 ;
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 ( '请选择正确的开始时间!' ) ;
}
} else {
this . $msg ( '请选择开始时间!' ) ;
}
} else if ( this . goods_detail . product . type == 1 ) {
let date1 = false ;
let date2 = false ;
let date3 = false ;
if ( this . live_date != '请选择入住日期' ) {
let date_compare = this . compareDate ( this . live_date ) ;
if ( date_compare ) {
date1 = true ;
} else {
this . $msg ( '请选择正确的入住日期!' ) ;
return
}
} else {
this . $msg ( '请选择入住日期!' ) ;
return
}
if ( this . leave_date != '请选择离店日期' ) {
let date_compare = this . compareDate ( this . leave_date ) ;
if ( date_compare ) {
date2 = true ;
} else {
this . $msg ( '请选择正确的离店日期!' ) ;
return
}
} else {
this . $msg ( '请选择离店日期!' ) ;
return
}
if ( this . arrive_date != '请选择到店日期' ) {
let date_compare = this . compareDate ( this . arrive_date ) ;
if ( date_compare ) {
date3 = true ;
} else {
this . $msg ( '请选择正确的到店日期!' ) ;
return
}
} else {
this . $msg ( '请选择到店日期!' ) ;
return
}
if ( this . arrive_time == '请选择到店时间' ) {
this . $msg ( '请选择到店时间!' ) ;
return
}
if ( date1 && date2 && date3 ) {
let arrival_timedate = this . arrive_date + ' ' + this . arrive_time
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 check_in_time = this . live_date ;
let check_out_time = this . leave_date ;
let totalLive = this . totalLive ;
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 ) {
if ( this . go_date != '请选择开始时间' ) {
let date_compare = this . compareDate ( this . go_date ) ;
console . log ( date_compare )
if ( date_compare ) {
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 ;
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 ( '请选择正确的开始时间!' ) ;
}
} else {
this . $msg ( '请选择开始时间!' ) ;
}
}
/ / l e t g o o d s _ i d = t h i s . g o o d s _ d e t a i l . i d ;
/ / t h i s . $ u r l ( ' / p a g e s / o r d e r / c o n f i r m _ o r d e r ? g o o d s _ i d = ' + g o o d s _ i d ) ;
} ,
} ,
/ / 预 览 图 片
/ / 预 览 图 片
lookImg ( index ) {
lookImg ( index ) {