27 changed files with 2875 additions and 215 deletions
@ -0,0 +1,154 @@ |
|||
// pages/component/myCalendar/index.js
|
|||
import util from "../../../utils/util" |
|||
let app = getApp() |
|||
Component({ |
|||
/** |
|||
* 组件的属性列表 |
|||
*/ |
|||
options: { |
|||
styleIsolation: 'apply-shared', |
|||
addGlobalClass: true |
|||
}, |
|||
properties: { |
|||
datelist:{ |
|||
type:Array, |
|||
value:[] |
|||
}, |
|||
activeDay:{ |
|||
type:String, |
|||
value:'' |
|||
} |
|||
}, |
|||
|
|||
/** |
|||
* 组件的初始数据 |
|||
*/ |
|||
data: { |
|||
year: 0, |
|||
month: 0, |
|||
date: ['日', '一', '二', '三', '四', '五', '六'], |
|||
dateArr: [], |
|||
isToday: 0, |
|||
isTodayWeek: false, |
|||
todayIndex: 0, |
|||
isKj:null, |
|||
isGp:null |
|||
}, |
|||
lifetimes: { |
|||
attached: function() { |
|||
let now = new Date(); |
|||
let year = now.getFullYear(); |
|||
let month = now.getMonth() + 1; |
|||
this.dateInit(); |
|||
this.setData({ |
|||
year: year, |
|||
month: month, |
|||
isToday: '' + year + month + now.getDate(), |
|||
isKj:app.globalData.kjId, |
|||
isGp:app.globalData.gp_id || app.globalData.team_id |
|||
}) |
|||
let dates={} |
|||
this.properties.datelist.map(item=>{ |
|||
dates[item.date] = item |
|||
}) |
|||
console.log(dates) |
|||
this.setData({ |
|||
dates:dates |
|||
}) |
|||
} |
|||
}, |
|||
/** |
|||
* 组件的方法列表 |
|||
*/ |
|||
methods: { |
|||
dateInit: function (setYear, setMonth) { |
|||
//全部时间的月份都是按0~11基准,显示月份才+1
|
|||
let dateArr = []; //需要遍历的日历数组数据
|
|||
let arrLen = 0; //dateArr的数组长度
|
|||
let now = setYear ? new Date(setYear, setMonth) : new Date(); |
|||
let year = setYear || now.getFullYear(); |
|||
let nextYear = 0; |
|||
let month = setMonth || now.getMonth(); //没有+1方便后面计算当月总天数
|
|||
let nextMonth = (month + 1) > 11 ? 1 : (month + 1); |
|||
let startWeek = new Date(year + '/' + (month + 1) + '/' + 1).getDay(); //目标月1号对应的星期
|
|||
let dayNums = new Date(year, nextMonth, 0).getDate(); //获取目标月有多少天
|
|||
let obj = {}; |
|||
let num = 0; |
|||
|
|||
if (month + 1 > 11) { |
|||
nextYear = year + 1; |
|||
dayNums = new Date(nextYear, nextMonth, 0).getDate(); |
|||
} |
|||
arrLen = startWeek + dayNums; |
|||
for (let i = 0; i < arrLen; i++) { |
|||
if (i >= startWeek) { |
|||
num = i - startWeek + 1; |
|||
let date =util.formatDate(new Date(year +'/' + (month + 1) +'/' + num)); |
|||
obj = { |
|||
isToday: '' + year + (month + 1) + num, |
|||
dateNum: num, |
|||
weight: 5, |
|||
date:date |
|||
} |
|||
} else { |
|||
obj = {}; |
|||
} |
|||
dateArr[i] = obj; |
|||
} |
|||
// dateArr.map(monthDate=>{
|
|||
// console.log(monthDate)
|
|||
// })
|
|||
this.setData({ |
|||
dateArr: dateArr |
|||
}) |
|||
|
|||
let nowDate = new Date(); |
|||
let nowYear = nowDate.getFullYear(); |
|||
let nowMonth = nowDate.getMonth() + 1; |
|||
let nowWeek = nowDate.getDay(); |
|||
let getYear = setYear || nowYear; |
|||
let getMonth = setMonth >= 0 ? (setMonth + 1) : nowMonth; |
|||
|
|||
if (nowYear == getYear && nowMonth == getMonth) { |
|||
this.setData({ |
|||
isTodayWeek: true, |
|||
todayIndex: nowWeek |
|||
}) |
|||
} else { |
|||
this.setData({ |
|||
isTodayWeek: false, |
|||
todayIndex: -1 |
|||
}) |
|||
} |
|||
}, |
|||
lastMonth: function () { |
|||
//全部时间的月份都是按0~11基准,显示月份才+1
|
|||
let year = this.data.month - 2 < 0 ? this.data.year - 1 : this.data.year; |
|||
let month = this.data.month - 2 < 0 ? 11 : this.data.month - 2; |
|||
this.setData({ |
|||
year: year, |
|||
month: (month + 1) |
|||
}) |
|||
this.dateInit(year, month); |
|||
}, |
|||
nextMonth: function () { |
|||
//全部时间的月份都是按0~11基准,显示月份才+1
|
|||
let year = this.data.month > 11 ? this.data.year + 1 : this.data.year; |
|||
let month = this.data.month > 11 ? 0 : this.data.month; |
|||
this.setData({ |
|||
year: year, |
|||
month: (month + 1) |
|||
}) |
|||
this.dateInit(year, month); |
|||
}, |
|||
onTapDay:function(e){ |
|||
let date = e.currentTarget.dataset.date; |
|||
console.log(date) |
|||
|
|||
if (date) { |
|||
console.log('trigger') |
|||
this.triggerEvent("onTapDay",date) |
|||
} |
|||
}, |
|||
} |
|||
}) |
|||
@ -0,0 +1,4 @@ |
|||
{ |
|||
"component": true, |
|||
"usingComponents": {} |
|||
} |
|||
@ -0,0 +1,20 @@ |
|||
<wxs src="../../../utils/filter.wxs" module="tool" /> |
|||
<view class='wrap'> |
|||
<view> |
|||
<view class='date-show'> |
|||
<view class="iconfont icon-you-copy lt-arrow" bindtap='lastMonth'></view> |
|||
{{year}}年{{month}}月 |
|||
<view class="iconfont icon-you rt-arrow" bindtap='nextMonth'></view> |
|||
</view> |
|||
</view> |
|||
<view class='header'> |
|||
<view wx:for='{{date}}' class='{{(index == todayIndex) && isTodayWeek ? "weekMark" : ""}}'>{{item}}<view></view></view> |
|||
</view> |
|||
<view class='date-box'> |
|||
<view bindtap="onTapDay" wx:for='{{dateArr}}' class='{{activeDay == item.date ? "nowDay" : ""}}' data-date='{{dates[item.date]}}' style="flex-direction:column"> |
|||
<view class="date-head{{dates[item.date]?'':' disable'}}" > |
|||
<view>{{item.dateNum}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,116 @@ |
|||
.date-show{ |
|||
position: relative; |
|||
width: 250rpx; |
|||
font-family: PingFang-SC-Regular; |
|||
font-size: 40rpx; |
|||
color: #282828; |
|||
text-align: center; |
|||
margin: 30rpx auto; |
|||
} |
|||
.lt-arrow,.rt-arrow{ |
|||
position: absolute; |
|||
top: 1rpx; |
|||
width: 60rpx; |
|||
line-height: 60rpx; |
|||
padding-right: 0.6rem; |
|||
} |
|||
.lt-arrow image,.rt-arrow image{ |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
} |
|||
.lt-arrow{ |
|||
left: -110rpx; |
|||
/* transform: rotate(180deg); */ |
|||
} |
|||
.rt-arrow{ |
|||
right: -100rpx; |
|||
} |
|||
.header{ |
|||
font-size: 0; |
|||
padding: 0 24rpx; |
|||
} |
|||
.header>view{ |
|||
display: inline-block; |
|||
width: 14.285%; |
|||
color: #333; |
|||
font-size: 30rpx; |
|||
text-align: center; |
|||
border-bottom: 1px solid #D0D0D0; |
|||
padding: 39rpx 0; |
|||
} |
|||
.weekMark{ |
|||
position: relative; |
|||
} |
|||
.weekMark view{ |
|||
position: absolute; |
|||
bottom: 0; |
|||
left: 0; |
|||
width: 100%; |
|||
/* border-bottom: 1px solid #22A7F6; */ |
|||
} |
|||
.date-box{ |
|||
font-size: 0; |
|||
padding: 10rpx 0; |
|||
} |
|||
.date-box>view{ |
|||
position: relative; |
|||
width: 14.285%; |
|||
color: #020202; |
|||
font-size: 40rpx; |
|||
text-align: center; |
|||
vertical-align: middle; |
|||
height: 90rpx; |
|||
display: inline-flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
.date-head{ |
|||
/* height: 60rpx; */ |
|||
/* line-height: 60rpx; */ |
|||
font-size: 26rpx; |
|||
} |
|||
.date-head.disable { |
|||
color: #999; |
|||
} |
|||
.date-tip { |
|||
font-size: 24rpx; |
|||
line-height: 26rpx; |
|||
color: #D62828; |
|||
} |
|||
.date-tip.disable { |
|||
color: #999; |
|||
} |
|||
.nowDay .date-head{ |
|||
width: 60rpx; |
|||
line-height: 60rpx; |
|||
border-radius: 50%; |
|||
text-align: center; |
|||
color: #fff; |
|||
background-color: #0B898E; |
|||
margin: 0 auto; |
|||
} |
|||
.date-weight{ |
|||
font-size: 22rpx; |
|||
padding: 15rpx 0; |
|||
} |
|||
.nowDay .date-weight{ |
|||
color: #0B898E; |
|||
} |
|||
.one{ |
|||
position: absolute; |
|||
bottom: 0; |
|||
right: 5rpx; |
|||
width: 20rpx; |
|||
height: 20rpx; |
|||
border-radius: 50%; |
|||
background-color: red; |
|||
} |
|||
.two{ |
|||
position: absolute; |
|||
bottom: 30rpx; |
|||
right: 5rpx; |
|||
width: 20rpx; |
|||
height: 20rpx; |
|||
border-radius: 50%; |
|||
background-color: blue; |
|||
} |
|||
@ -1,5 +1,6 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
"title":"/pages/component/TitleHeader", |
|||
"calendar":"/pages/component/calendarTheatre/index" |
|||
} |
|||
} |
|||
@ -0,0 +1,708 @@ |
|||
// pages/order/scene/index.js
|
|||
let app = getApp() |
|||
import util from "../../../utils/util" |
|||
import commonApi from "../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
product:null, |
|||
productNum: 1, |
|||
linkmanList: [], |
|||
date: "", |
|||
time: "", |
|||
remark: "", |
|||
singlePrice: 0, |
|||
type: null, |
|||
coupon:null, |
|||
isLogin: false, |
|||
kjId: null, |
|||
gp_id: null, |
|||
groupName: "", |
|||
prizeId: null, |
|||
select_allowance: false, |
|||
showAllowance: false, |
|||
allowance_data: null, |
|||
allowance_price: 0, |
|||
pIndex: 0, |
|||
flag:null, |
|||
ticket_type:1, |
|||
isCar:'single', |
|||
showMask: false, |
|||
price:0, |
|||
is_need_idcard:1, |
|||
is_authentication:1, // 是否实名,0否1是,默认实名
|
|||
phone:'', //不实名时传的手机号
|
|||
is_real_name:1, // 是否是一证一票,0否1是,
|
|||
status:false, |
|||
date: "", |
|||
time: "", |
|||
ydxz:false, //预定须知弹框
|
|||
bookingInfo: null, |
|||
bookingInfoTitle: "", |
|||
showDate:false, |
|||
showDate2:false, |
|||
showYhq:null, |
|||
couponFlag:false, |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
product: app.globalData.product, |
|||
type: options.type, |
|||
kjId: app.globalData.kjId, |
|||
gp_id: app.globalData.gp_id || app.globalData.team_id, |
|||
prizeId: wx.getStorageSync('prizeId'), |
|||
flag:options.flag, |
|||
date:null, |
|||
ticket_type:app.globalData.product.sku.ticket_type || 1, |
|||
isCar:options.isCar, |
|||
is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard, |
|||
is_authentication:app.globalData.product.sku.sku_model.is_authentication, |
|||
is_real_name:app.globalData.product.sku.sku_model.is_real_name, |
|||
date: app.globalData.product.date, |
|||
time: app.globalData.product.time || {}, |
|||
showYhq:app.globalData.listName?false:true |
|||
}) |
|||
console.log('-------',this.data.product.sku.sku_model); |
|||
// // debugger
|
|||
console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard); |
|||
console.log('---是否实名----',app.globalData.product.sku.sku_model.is_authentication); |
|||
console.log('---一证一票----',app.globalData.product.sku.sku_model.is_real_name); |
|||
// console.log(app.globalData.list, app.globalData.index,'list---index')
|
|||
if (!app.globalData.product) { |
|||
util.back(); |
|||
return; |
|||
} |
|||
if (!app.globalData.product.time) { |
|||
app.globalData.product.time = {} |
|||
} |
|||
if (app.globalData.product.productNum) { |
|||
this.setData({ |
|||
productNum: app.globalData.product.productNum < 1 ? 1 : app.globalData.product.productNum |
|||
}) |
|||
}else{ |
|||
this.setData({ |
|||
productNum: app.globalData.product.num == null ? 1 : app.globalData.product.num |
|||
}) |
|||
} |
|||
this.setData({ |
|||
product: app.globalData.product, |
|||
singlePrice: app.globalData.product.date?app.globalData.product.date.price :(this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price) |
|||
// singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
|
|||
}) |
|||
// console.log(this.data.singlePrice);
|
|||
this.getNewCoupon() |
|||
// this.showAllPrice()
|
|||
// console.log('********',this.data.product);
|
|||
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { |
|||
this.couponCom = this.selectAllComponents("#coupon")[0]; |
|||
} |
|||
}, |
|||
// next: function () {
|
|||
// this.setData({
|
|||
// showMask:true
|
|||
// })
|
|||
// },
|
|||
// changeDate() {
|
|||
// this.setData({
|
|||
// showDate: true,
|
|||
// })
|
|||
// },
|
|||
hideDate: function () { |
|||
this.setData({ |
|||
showDate: false |
|||
}) |
|||
}, |
|||
showBookingInfo: function (e) { |
|||
this.setData({ |
|||
bookingInfo: this.data.product.sku.sku_model, |
|||
bookingInfoTitle: this.data.product.sku.sku_name |
|||
}) |
|||
util.pagePoint({ |
|||
event: "scene_notice", |
|||
param: { |
|||
type: this.data.product.type, |
|||
id: this.data.product.id |
|||
} |
|||
}, 1) |
|||
}, |
|||
closeMask: function () { |
|||
this.setData({ |
|||
bookingInfo: null |
|||
}) |
|||
}, |
|||
showAllPrice:function () { |
|||
// console.log('detail',app.globalData.product);
|
|||
// console.log('singlePrice',this.data.singlePrice);
|
|||
// console.log('productNum',this.data.productNum);
|
|||
console.log('couponInfo',app.globalData.couponInfo); |
|||
if (this.data.ticket_type != 1) { |
|||
// this.setData({
|
|||
// singlePrice:app.globalData.product.product.price
|
|||
// })
|
|||
let price |
|||
if (this.data.coupon) { |
|||
console.log(app.globalData.couponInfo,this.data.coupon); |
|||
if (this.data.coupon.activity.discount_type == 'pricebreak') { |
|||
price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money |
|||
} else { |
|||
price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 |
|||
} |
|||
} else { |
|||
price = this.data.singlePrice * this.data.productNum |
|||
} |
|||
|
|||
if (price >0) { |
|||
this.setData({ |
|||
price:price/100 |
|||
}) |
|||
}else { |
|||
this.setData({ |
|||
price:0 |
|||
}) |
|||
} |
|||
// console.log(this.data.singlePrice);
|
|||
}else { |
|||
let price |
|||
if (this.data.coupon) { |
|||
if (this.data.coupon.activity.discount_type == 'pricebreak') { |
|||
price = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money |
|||
} else { |
|||
price =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 |
|||
} |
|||
} else { |
|||
price = this.data.singlePrice * this.data.productNum |
|||
} |
|||
if (price >0) { |
|||
this.setData({ |
|||
price:price/100 |
|||
}) |
|||
}else { |
|||
this.setData({ |
|||
price:0 |
|||
}) |
|||
} |
|||
} |
|||
|
|||
}, |
|||
cancel: function () { |
|||
this.setData({ |
|||
showMask:false |
|||
}) |
|||
}, |
|||
changeGroupName: function (e) { |
|||
this.setData({ |
|||
groupName: e.detail.value |
|||
}) |
|||
}, |
|||
setLinkman: function (e) { |
|||
if (e.detail.phone || e.detail.phone=='') { |
|||
this.setData({ |
|||
phone:e.detail.phone |
|||
}) |
|||
}else { |
|||
console.log(e); |
|||
let linkmanList = e.detail; |
|||
if (this.data.productNum != linkmanList.length && this.data.coupon) { |
|||
wx.showToast({ |
|||
title: '订单价格发生变化,请重新选择优惠券', |
|||
icon: 'none' |
|||
}) |
|||
|
|||
} |
|||
this.setData({ |
|||
// productNum: productNum,
|
|||
linkmanList: linkmanList |
|||
}) |
|||
console.log(this.data.linkmanList); |
|||
// this.changePrice()
|
|||
this.totalPrice(this.data.singlePrice) |
|||
} |
|||
}, |
|||
add: function () { |
|||
if (this.data.productNum==undefined) { |
|||
wx.showToast({ |
|||
title: '请先添加出行人', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (this.data.product.sku.sku_model.traveller_limit_num != 0 && this.data.productNum == this.data.product.sku.sku_model.traveller_limit_num) { |
|||
wx.showToast({ |
|||
title: '本产品单笔限购' + this.data.product.sku.sku_model.traveller_limit_num + "份", |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} |
|||
this.setData({ |
|||
productNum: this.data.productNum + 1 |
|||
}) |
|||
this.data.product.num = this.data.productNum |
|||
// this.changePrice()
|
|||
// this.showAllPrice()
|
|||
this.totalPrice(this.data.singlePrice) |
|||
}, |
|||
minus: function () { |
|||
if (this.data.productNum==undefined) { |
|||
wx.showToast({ |
|||
title: '请先添加出行人', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (this.data.productNum == 1) return; |
|||
if (this.data.coupon) { |
|||
wx.showToast({ |
|||
title: '订单价格发生变化,请重新选择优惠券', |
|||
icon: 'none' |
|||
}) |
|||
} |
|||
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag && this.data.type!='museum') { |
|||
// this.couponCom.setNullCoupon()
|
|||
|
|||
} |
|||
app.globalData.couponInfo = null; |
|||
console.log(this.data.couponFlag); |
|||
this.setData({ |
|||
productNum: (this.data.productNum - 1), |
|||
coupon: null, |
|||
couponFlag:true |
|||
}) |
|||
this.data.product.num = this.data.productNum |
|||
// this.changePrice()
|
|||
// this.showAllPrice()
|
|||
this.totalPrice(this.data.singlePrice) |
|||
}, |
|||
totalPrice(price) { |
|||
let allPrice |
|||
if (this.data.coupon) { |
|||
if (this.data.coupon.activity.discount_type == 'pricebreak') { |
|||
allPrice = this.data.singlePrice * this.data.productNum - this.data.coupon.activity.money |
|||
} else { |
|||
allPrice =(this.data.singlePrice * this.data.productNum * this.data.coupon.activity.fold)/ 10 |
|||
} |
|||
} else { |
|||
allPrice = this.data.singlePrice * this.data.productNum |
|||
} |
|||
|
|||
// allPrice = price * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0)
|
|||
if (allPrice >0) { |
|||
this.setData({ |
|||
price:allPrice/100, |
|||
singlePrice:price |
|||
}) |
|||
}else { |
|||
this.setData({ |
|||
price:0, |
|||
singlePrice:price |
|||
}) |
|||
} |
|||
console.log('singlePrice',this.data.singlePrice); |
|||
}, |
|||
changeDate: function (e) { |
|||
console.log('打印',e); |
|||
this.setData({ |
|||
showDate:true |
|||
}) |
|||
// debugger
|
|||
// this.showAllPrice()
|
|||
this.totalPrice(e.detail.price) |
|||
if (e.detail.price != this.data.singlePrice && this.data.coupon) { |
|||
wx.showToast({ |
|||
title: '订单价格发生变化,请重新选择优惠券', |
|||
icon: 'none' |
|||
}) |
|||
this.setData({ |
|||
coupon: null, |
|||
singlePrice:e.detail.price |
|||
}) |
|||
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { |
|||
this.couponCom.setNullCoupon() |
|||
} |
|||
app.globalData.couponInfo = null; |
|||
} |
|||
app.globalData.product.changeFlag = true |
|||
this.setData({ |
|||
date: e.detail, |
|||
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price, |
|||
showDate2:true |
|||
}) |
|||
// this.changePrice()
|
|||
}, |
|||
changeTime: function (e) { |
|||
this.setData({ |
|||
time: e.detail |
|||
}) |
|||
}, |
|||
changeAllowance: function () { |
|||
this.setData({ |
|||
showAllowance: !this.data.showAllowance |
|||
}) |
|||
}, |
|||
phoneInput:function(e){ |
|||
this.setData({ |
|||
phone: e.detail.value |
|||
}) |
|||
}, |
|||
/** |
|||
* 补贴价 |
|||
*/ |
|||
changePrice: function () { |
|||
let product = this.data.product, price = product.sku.price; |
|||
if (this.data.allowance_data && this.data.select_allowance && this.data.allowance_price) { |
|||
let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price); |
|||
price -= this.data.allowance_price < spread_price ? this.data.allowance_price : spread_price |
|||
} |
|||
this.setData({ |
|||
singlePrice: app.globalData.kjId ? 0 : price |
|||
}) |
|||
|
|||
}, |
|||
changed() { |
|||
app.globalData.product.date = this.data.date |
|||
app.globalData.product.time = this.data.time |
|||
app.globalData.product.changeFlag = true |
|||
this.hideDate() |
|||
}, |
|||
order:function() { |
|||
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product; |
|||
let linkmanIds = []; |
|||
if (linkmanList.length==0 && this.data.is_authentication == 1) { |
|||
wx.showToast({ |
|||
title: '请选择出行人', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (this.data.is_authentication == 1) { |
|||
linkmanList.map(item => { |
|||
linkmanIds.push(item.id) |
|||
}) |
|||
} |
|||
if (this.data.is_authentication == 0) { //是否实名:0否1是
|
|||
if (this.data.phone == '') { |
|||
wx.showToast({ |
|||
title: '请填写手机号', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
// 判断时间日期
|
|||
if (!date && this.data.ticket_type == 1) { |
|||
wx.showToast({ |
|||
title: '请选择使用日期', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (!time && date && date.is_time_stock == true) { |
|||
wx.showToast({ |
|||
title: '请选择使用时间', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
|
|||
let data = { |
|||
coupon_id: this.data.coupon ? this.data.coupon.id : null, |
|||
source: "WECHATXCX", |
|||
product_list: [{ |
|||
type: product.product.type, |
|||
product_id: product.product.id, |
|||
sku_id: (date && date.sku_id) ? date.sku_id : product.sku.id, |
|||
start_time: time.start_time, |
|||
end_time: time.end_time, |
|||
use_date: date ? date.date : '', |
|||
visitors: linkmanIds.join(","), |
|||
remark: remark, |
|||
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum, |
|||
phone:this.data.phone,// 不实名的时候传的手机号参数
|
|||
}], |
|||
originate_order_id: this.data.kjId, |
|||
gp_id: app.globalData.gp_id, |
|||
team_id: app.globalData.team_id, |
|||
linkmanList:this.data.is_authentication == 1?this.data.linkmanList:[] |
|||
} |
|||
if (app.globalData.from) { |
|||
data.system_name = app.globalData.from; |
|||
} |
|||
if (app.globalData.retailId) { |
|||
data.commission_code = app.globalData.retailId; |
|||
app.globalData.retailId = null; |
|||
} |
|||
if (app.globalData.category_id) { |
|||
data.category_id = app.globalData.category_id; |
|||
} |
|||
if (this.data.prizeId) { |
|||
data.lottery_id = this.data.prizeId |
|||
} |
|||
console.log(data) |
|||
let service = 'order/create', postData = { |
|||
data: JSON.stringify(data) |
|||
} |
|||
if (app.globalData.product.isGroup == 1) { |
|||
service = "team_order/appoint" |
|||
postData.member_num = this.data.productNum |
|||
postData.team_name = this.data.groupName |
|||
postData.type = 1; |
|||
} |
|||
if(app.globalData.list){ |
|||
app.globalData.list[app.globalData.index] = this.data.product |
|||
// app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList
|
|||
if (app.globalData.list[app.globalData.index].sku.sku_model.is_authentication == 0) { |
|||
app.globalData.list[app.globalData.index].phone = this.data.phone |
|||
app.globalData.list[app.globalData.index].linkmanList = [] |
|||
}else { |
|||
app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList |
|||
} |
|||
} |
|||
// app.globalData.linkmanList = this.data.linkmanList
|
|||
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; |
|||
console.log(app.globalData); |
|||
if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1 &&this.data.type!='museum'){ |
|||
if(app.globalData.createDate){ |
|||
app.globalData.createDate.product_list.push(data.product_list[0]) |
|||
}else{ |
|||
app.globalData.createDate = data |
|||
} |
|||
console.log(app.globalData.createDate); |
|||
app.globalData.index = app.globalData.index + 1 |
|||
app.globalData.product = app.globalData.list[app.globalData.index] |
|||
wx.redirectTo({ |
|||
url: '/pages/order/scene/index?flag='+ this.data.flag+'&isCar='+this.data.isCar, |
|||
}) |
|||
return |
|||
}else{ |
|||
if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){ |
|||
if(app.globalData.createDate){ |
|||
app.globalData.createDate.product_list.push(data.product_list[0]) |
|||
} |
|||
wx.redirectTo({ |
|||
url: '/pages/order/orderList/index?flag='+ this.data.flag |
|||
}) |
|||
}else{ |
|||
commonApi.user_post(service, postData).then(res => { |
|||
if (app.globalData.kjId) { |
|||
this.setData({ |
|||
kjId: null |
|||
}); |
|||
app.globalData.kjId = null; |
|||
} |
|||
if (app.globalData.gp_id) { |
|||
this.setData({ |
|||
gp_id: null |
|||
}); |
|||
app.globalData.gp_id = null; |
|||
} |
|||
if (res.code == 1 && app.globalData.product.isGroup == 1) { |
|||
// 团购跳转到团购详情
|
|||
wx.navigateTo({ |
|||
url: '/pages/info/groupOrderInfo/index?id=' + res.data.order_id + '&from=order' |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}, |
|||
next: function () { |
|||
console.log(this.data) |
|||
let linkmanList = this.data.linkmanList, productNum = this.data.productNum, date = this.data.date, time = this.data.time, remark = this.data.remark, product = this.data.product; |
|||
let linkmanIds = []; |
|||
|
|||
if (!date && this.data.ticket_type == 1) { |
|||
wx.showToast({ |
|||
title: '请选择使用日期', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (linkmanList.length!=productNum && this.data.is_authentication == 1 && this.data.is_real_name == 1) { |
|||
wx.showToast({ |
|||
title: '购票数量要和出行人数量一致', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (!util.isTel(this.data.phone) &&this.data.is_authentication == 0) { |
|||
wx.showToast({ |
|||
title: '请输入正确的手机号', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (!time && date && date.is_time_stock == true) { |
|||
wx.showToast({ |
|||
title: '请选择使用时间', |
|||
icon: 'none' |
|||
}) |
|||
return |
|||
} |
|||
if (app.globalData.product.isGroup == 1 && !this.data.groupName) { |
|||
wx.showToast({ |
|||
title: '请输入团队主体名称', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
this.setData({ |
|||
showMask:true |
|||
}) |
|||
|
|||
}, |
|||
// 活动预约
|
|||
activityOrder: function () { |
|||
if (this.data.linkmanList && this.data.linkmanList.length > 0) { |
|||
commonApi.user_post("pbservice/Culture/booking", { |
|||
id: this.data.product.product.id, |
|||
name: this.data.linkmanList[0].name, |
|||
card_number: this.data.linkmanList[0].id_number, |
|||
tel: this.data.linkmanList[0].tel |
|||
}).then(res => { |
|||
if (res.code == 1) { |
|||
wx.showToast({ |
|||
title: '预约成功', |
|||
icon: 'success' |
|||
}) |
|||
setTimeout(() => { |
|||
wx.navigateBack() |
|||
}, 1000) |
|||
return; |
|||
} |
|||
}) |
|||
} |
|||
else { |
|||
wx.showToast({ |
|||
title: '请选择出行人', |
|||
icon: 'none' |
|||
}) |
|||
return; |
|||
} |
|||
|
|||
}, |
|||
/** |
|||
* 选择补贴 |
|||
*/ |
|||
selectAllowance: function () { |
|||
this.setData({ |
|||
select_allowance: !this.data.select_allowance |
|||
}) |
|||
this.changePrice() |
|||
}, |
|||
//获取最高优惠券
|
|||
getNewCoupon(e){ |
|||
|
|||
this.setData({ |
|||
coupon:e.detail |
|||
}) |
|||
|
|||
this.showAllPrice() |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
// this.setData({
|
|||
// productNum:1
|
|||
// })
|
|||
// app.globalData.productNum =1
|
|||
if(app.globalData.list && app.globalData.list.length != 0 && this.data.type!='museum'){ |
|||
app.globalData.product = app.globalData.list[app.globalData.index] |
|||
} |
|||
if (!this.data.isLogin) { |
|||
commonApi.user_post("token/check").then(res => { |
|||
if (res.code == 1) { |
|||
this.setData({ |
|||
isLogin: true |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
// this.setData({
|
|||
// coupon: app.globalData.couponInfo
|
|||
// })
|
|||
// 获取补贴
|
|||
// if (this.data.product) {
|
|||
// commonApi.user_post("product/getProductAllowancePrice", {
|
|||
// product_code: this.data.product.product.product_code
|
|||
// }).then(resTwo => {
|
|||
// if (resTwo && resTwo.code == 1) {
|
|||
// this.setData({
|
|||
// allowance_data: resTwo.data
|
|||
// })
|
|||
// let spread_price = Number(this.data.allowance_data.discount_limit_price - this.data.allowance_data.user_used_price)
|
|||
// let sInfo = this.data.product.sku
|
|||
// if (spread_price > 0) {
|
|||
// if (spread_price < this.data.allowance_data.discount_rate / 100 * sInfo.price) {
|
|||
// this.setData({
|
|||
// allowance_price: spread_price
|
|||
// })
|
|||
// } else {
|
|||
// this.setData({
|
|||
// allowance_price: this.data.allowance_data.discount_rate / 100 * sInfo.price
|
|||
// })
|
|||
// }
|
|||
// this.changePrice()
|
|||
// } else {
|
|||
// this.setData({
|
|||
// allowance_price: 0
|
|||
// })
|
|||
// }
|
|||
// }
|
|||
// })
|
|||
// }
|
|||
// console.log('-----',app.globalData.product.sku.price);
|
|||
// app.globalData.product = delete(app.globalData.product.detail)
|
|||
// this.showAllPrice()
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
this.setData({ |
|||
couponFlag:false |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
this.setData({ |
|||
kjId: null, |
|||
gp_id: null |
|||
}); |
|||
app.globalData.kjId = null; |
|||
app.globalData.gp_id = null; |
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,10 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader", |
|||
"date1":"../components/date/index", |
|||
"contact":"../components/contact/index", |
|||
"coupon":"../components/coupon/index", |
|||
"notice":"/pages/component/notice/notice", |
|||
"date":"/pages/order/components/date" |
|||
} |
|||
} |
|||
@ -0,0 +1,116 @@ |
|||
<!--pages/order/scene/index.wxml--> |
|||
<view class="{{product && product.isGroup==1?'group-order':''}}"> |
|||
<title title="提交订单"></title> |
|||
|
|||
<view class="box" style="padding: 42rpx 21rpx 45rpx 19rpx;display: flex;justify-content: space-between;align-items: center;"> |
|||
<view style="width: 550rpx;"> |
|||
<view style="font-weight: bold;font-size: 36rpx;color: #000000;margin-bottom: 27rpx;" class="textOver2"> |
|||
{{product.product.title}} |
|||
</view> |
|||
<view style="font-weight: 500;font-size: 27rpx;color: #333;padding-left: 2rpx;"> |
|||
场次: {{date.date}} {{date.week}} {{time.start_time}} |
|||
</view> |
|||
</view> |
|||
<!-- <view class="change-date" bindtap="changeDate" wx:if="{{ticket_type!= 2}}"> |
|||
修改 > |
|||
</view> --> |
|||
</view> |
|||
|
|||
<view class="box"> |
|||
<view class="box-title"> |
|||
<view class="textOver" style="flex:1;font-size:36rpx;font-weight: bold;">{{product && product.isGroup!=1?product.sku.sku_name:'预约人数'}}</view> |
|||
|
|||
<view class="s-price"> |
|||
{{product.sku.price/100}} |
|||
</view> |
|||
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum==1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d2dce6169a5e8332ccd54579afddf8bc.png" mode=""/> |
|||
<image wx:if="{{!kjId && !gp_id && type!='activity' && productNum>1}}" bindtap="minus" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/d8699afa39e73bcc7f50ed617c93bb54.png" mode=""/> |
|||
<view class="number-box">{{productNum}}</view> |
|||
<image wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add" style="width: 46rpx;height: 46rpx;" src="https://static.ticket.sz-trip.com/uploads/20240725/cdb68a174f17b7036374580a8aa46641.png" mode=""/> |
|||
<!-- <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> --> |
|||
</view> |
|||
<view class="text1"> |
|||
<text wx:for="{{product.sku.display_tags}}"> |
|||
{{item}}<text style="margin:0 8rpx;" wx:if="{{index+1<=product.sku.display_tags.length}}">|</text> |
|||
</text> |
|||
<text bindtap="showBookingInfo" wx:if="{{product.sku.sku_model.bookinfo}}">预订须知 ></text> |
|||
</view> |
|||
|
|||
</view> |
|||
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}" is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact> |
|||
<!-- <view class="box" style="margin-top: -30rpx;border-top: 1px solid #CCCCCC;" wx:if="{{is_authentication}}"> |
|||
<view class="box-title"> |
|||
<view style="flex-shrink:0">联系手机</view> |
|||
<input bindinput="phoneInput" type="number" value="{{phone}}" class="weui-input" placeholder="请输入手机号" /> |
|||
</view> |
|||
</view> --> |
|||
|
|||
<coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single' && type!='museum' && showYhq}}" id="coupon" |
|||
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}" couponFlag="{{couponFlag}}"></coupon> |
|||
|
|||
|
|||
|
|||
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> |
|||
<view class="fixed-bottom"> |
|||
<view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view> |
|||
<view class="fixed-price-box" wx:else><text>合计:</text> |
|||
<text class="price">¥{{price}}</text> |
|||
</view> |
|||
<view class="fixed-btn" bindtap="order">去支付</view> |
|||
</view> |
|||
|
|||
<view class="mask" style="align-items:flex-end" wx:if="{{showMask}}"> |
|||
<view class="mask-bg" bindtap="cancel"></view> |
|||
<view class="mask-content1"> |
|||
<view class="dialog-top"> |
|||
<view class="scene-title">{{product.product.title}}-{{product.sku.sku_name}}</view> |
|||
<view class="people-message">出行人信息</view> |
|||
<view style="max-height:430rpx;overflow: scroll;" wx:if="{{is_authentication=='1'}}"> |
|||
<view class="people" wx:for="{{linkmanList}}"> |
|||
<view class="flex"> |
|||
<view>姓名:</view> |
|||
<view style="color: #333;">{{item.name}}</view> |
|||
</view> |
|||
<view class="flex" style="margin: 19.33rpx 0;"> |
|||
<view>证件号:</view> |
|||
<view style="color: #333;">{{item.id_number}}</view> |
|||
</view> |
|||
<view class="flex"> |
|||
<view>手机号:</view> |
|||
<view style="color: #333;">{{item.tel}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view wx:else> |
|||
<view class="flex" style="margin: 10rpx 0 30rpx;"> |
|||
<view>手机号:</view> |
|||
<view style="color: #333;">{{phone}}</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="bottom-btn"> |
|||
<view class="cancle" bindtap="cancel">取消</view> |
|||
<view class="confirm" bindtap="order">无问题,下一步</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<notice bookingInfo="{{bookingInfo}}" skuName="{{bookingInfoTitle}}" wx:if="{{bookingInfo}}" bind:close="closeMask"> |
|||
</notice> |
|||
<!-- 日期弹框 --> |
|||
<view class="mask" wx:if="{{showDate}}"> |
|||
<view class="mask-bg" bindtap="hideDate"></view> |
|||
<view class="mask-content2"> |
|||
<view class="iconfont icon-close" bindtap="hideDate"></view> |
|||
<date wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date> |
|||
<view class="bottom-box"> |
|||
<view> |
|||
合计: <text class="totalPrice">{{price}}</text> |
|||
</view> |
|||
<view class="next" bindtap="changed" data-sku="{{sku}}" data-product="{{item}}"> |
|||
<!-- <view class="next" bindtap="order" data-sku="{{sku}}" data-product="{{item}}"> --> |
|||
确定 |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,457 @@ |
|||
/* pages/.wxss */ |
|||
page { |
|||
background: #f6f6f6; |
|||
} |
|||
|
|||
.group-order { |
|||
background: #fff; |
|||
} |
|||
|
|||
.product-info { |
|||
padding: 20rpx 47rpx; |
|||
border-bottom: 1rpx solid #ccc; |
|||
} |
|||
|
|||
.product-title { |
|||
font-size: 33rpx; |
|||
color: #000; |
|||
font-weight: 500; |
|||
} |
|||
|
|||
.product-price { |
|||
color: #D62828; |
|||
font-size: 27rpx; |
|||
} |
|||
|
|||
.group-order .box-title { |
|||
margin: 0; |
|||
} |
|||
|
|||
.group-order .box, |
|||
.group-order .date-box { |
|||
border-bottom: 1rpx solid #D8D8D8; |
|||
border-radius: 0; |
|||
margin: 0 25rpx; |
|||
} |
|||
|
|||
.group-order .dates-boxes { |
|||
border-top: none; |
|||
padding-top: 0; |
|||
} |
|||
|
|||
.group-order .date-time.disable { |
|||
background: #CCCCCC; |
|||
color: #fff; |
|||
} |
|||
|
|||
.box { |
|||
margin: 30rpx 25rpx; |
|||
background: white; |
|||
border-radius: 9rpx; |
|||
} |
|||
|
|||
.box-title { |
|||
height:108rpx; |
|||
margin: 0 20rpx; |
|||
font-size: 31rpx; |
|||
color: #000; |
|||
font-weight: 500; |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.dates-boxes { |
|||
display: flex; |
|||
align-items: center; |
|||
padding: 31rpx 21rpx; |
|||
/* border-top: 1rpx solid #ccc; */ |
|||
} |
|||
|
|||
.date-item { |
|||
width: 120rpx; |
|||
height: 133rpx; |
|||
border-radius: 10rpx; |
|||
/* border: 1rpx solid #333; */ |
|||
text-align: center; |
|||
font-size: 27rpx; |
|||
color: #000; |
|||
margin-right: 20rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
flex-direction: column; |
|||
background: #F5F5F5; |
|||
flex-shrink: 0; |
|||
} |
|||
|
|||
.date-item.active { |
|||
border-color: #0B898E; |
|||
color: #fff; |
|||
background: #0B898E; |
|||
} |
|||
|
|||
.date-item.disable { |
|||
border-color: #CCCCCC; |
|||
color: #999; |
|||
} |
|||
|
|||
.date-item .price { |
|||
font-size: 25rpx; |
|||
color: #D62828; |
|||
} |
|||
|
|||
.date-item.active .price { |
|||
color: #fff; |
|||
} |
|||
.date-item.active view { |
|||
color: #fff; |
|||
} |
|||
|
|||
.date-item.disable .price { |
|||
color: #999; |
|||
} |
|||
.date-item.disable .short-date { |
|||
color: #999; |
|||
} |
|||
|
|||
.more-item { |
|||
/* width: 99rpx; |
|||
margin-right: 0; */ |
|||
position: absolute; |
|||
right: 0; |
|||
text-align: center; |
|||
padding: 0 26rpx 0 24rpx; |
|||
display: flex; |
|||
font-weight: 400; |
|||
font-size: 27rpx; |
|||
color: #0B898E; |
|||
align-items: center; |
|||
} |
|||
|
|||
.date-times { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
margin: 0 21rpx; |
|||
padding-top: 34rpx; |
|||
padding-bottom: 10rpx; |
|||
/* border-top: 1rpx dashed #ccc; */ |
|||
flex-wrap: wrap; |
|||
} |
|||
|
|||
.date-time { |
|||
width: 315rpx; |
|||
line-height: 58rpx; |
|||
/* border: 1px solid #333; */ |
|||
border-radius: 10rpx; |
|||
text-align: center; |
|||
font-size: 25rpx; |
|||
flex-shrink: 0; |
|||
margin-bottom: 24rpx; |
|||
color: #000; |
|||
background-color: #F5F5F5; |
|||
} |
|||
|
|||
.date-time.disable { |
|||
/* border-color: #ccc; |
|||
color: #666666; */ |
|||
background: #F5F5F5; |
|||
font-weight: 400; |
|||
font-size: 25rpx; |
|||
color: #999999; |
|||
} |
|||
.short-date { |
|||
font-weight: 500; |
|||
font-size: 27rpx; |
|||
color: #000000; |
|||
} |
|||
|
|||
.date-time.active { |
|||
border-color: #0B898E; |
|||
background: #0B898E; |
|||
color: #fff; |
|||
} |
|||
|
|||
.box-title .iconfont { |
|||
font-size: 28rpx; |
|||
flex-shrink: 0; |
|||
} |
|||
|
|||
.number-box { |
|||
font-size: 29rpx; |
|||
font-weight: 500; |
|||
color: #000; |
|||
flex-shrink: 0; |
|||
/* width: 67rpx; */ |
|||
line-height: 49rpx; |
|||
/* background: #F0F0F0; */ |
|||
border-radius: 7rpx; |
|||
text-align: center; |
|||
margin: 0 20rpx; |
|||
} |
|||
|
|||
.fixed-bottom { |
|||
position: fixed; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
height: 113rpx; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
background: white; |
|||
z-index: 1; |
|||
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1); |
|||
} |
|||
|
|||
.yuyue-box { |
|||
height: 138rpx; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.fixed-btn { |
|||
line-height: 80rpx; |
|||
width: 250rpx; |
|||
height: 80rpx; |
|||
background: #D62828; |
|||
border-radius: 40rpx; |
|||
margin-right: 50rpx; |
|||
font-family: PingFang SC; |
|||
font-weight: bold; |
|||
font-size: 32rpx; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
} |
|||
|
|||
.fixed-price-box { |
|||
margin-left: 25rpx; |
|||
flex-shrink: 0; |
|||
font-size: 29rpx; |
|||
color: #333; |
|||
font-weight: 500; |
|||
} |
|||
|
|||
.fixed-price-box .price { |
|||
color: #D62828; |
|||
font-size: 36rpx; |
|||
margin-left: 10rpx; |
|||
} |
|||
|
|||
.allowance { |
|||
justify-content: space-between; |
|||
} |
|||
|
|||
.allowance>view:nth-child(2) { |
|||
display: flex; |
|||
align-items: center; |
|||
} |
|||
|
|||
.allowance image { |
|||
width: 40rpx; |
|||
height: 40rpx; |
|||
margin-left: 10rpx; |
|||
} |
|||
|
|||
.allowance .border { |
|||
width: 30rpx; |
|||
height: 30rpx; |
|||
border-radius: 50%; |
|||
border: 4rpx solid #0B98BE; |
|||
margin-left: 10rpx; |
|||
} |
|||
|
|||
.coupon-btn { |
|||
width: 138rpx; |
|||
line-height: 56rpx; |
|||
border: 1px solid #333333; |
|||
border-radius: 29rpx; |
|||
text-align: center; |
|||
font-size: 28rpx; |
|||
color: #000; |
|||
} |
|||
|
|||
.box-title input { |
|||
flex: 1; |
|||
display: block; |
|||
font-size: 32rpx; |
|||
color: #000; |
|||
margin-left: 42rpx; |
|||
font-weight: 500; |
|||
text-align: left; |
|||
} |
|||
|
|||
.yuyue-btn { |
|||
width: 657rpx; |
|||
line-height: 78rpx; |
|||
border-radius: 39rpx; |
|||
} |
|||
|
|||
.group-order .yuyue-box { |
|||
height: 100rpx; |
|||
} |
|||
|
|||
.group-order .yuyue-btn { |
|||
width: 100%; |
|||
/* height: 100%; */ |
|||
line-height: 100rpx; |
|||
border-radius: 0; |
|||
} |
|||
|
|||
.mask-allowance .mask-content { |
|||
margin: auto; |
|||
top: initial; |
|||
bottom: initial; |
|||
padding: 20rpx; |
|||
} |
|||
|
|||
.mask-allowance .mask-content .rule-title { |
|||
text-align: center; |
|||
margin-bottom: 20rpx; |
|||
} |
|||
|
|||
.dialog-top { |
|||
color: #999; |
|||
font-weight: 500; |
|||
padding: 40rpx 33.33rpx 0; |
|||
} |
|||
|
|||
.scene-title { |
|||
font-size: 35rpx; |
|||
font-weight: bold; |
|||
color: #333; |
|||
margin-bottom: 32.67rpx; |
|||
} |
|||
|
|||
.people-message { |
|||
margin-bottom: 26.67rpx; |
|||
/* padding-bottom: 26.67rpx; */ |
|||
/* border-bottom: 1px solid #F0F0F0; */ |
|||
font-weight: bold; |
|||
font-size: 32rpx; |
|||
} |
|||
|
|||
.people { |
|||
border-top: 1rpx solid #F0F0F0; |
|||
padding: 26.67rpx 0 24rpx; |
|||
} |
|||
|
|||
.flex { |
|||
display: flex; |
|||
} |
|||
|
|||
.bottom-btn { |
|||
display: flex; |
|||
border-top: 1rpx solid #F0F0F0; |
|||
height: 96rpx; |
|||
/* padding: 32.67rpx 0; */ |
|||
} |
|||
|
|||
.cancle { |
|||
width: 50%; |
|||
color: #999; |
|||
text-align: center; |
|||
line-height: 96rpx; |
|||
} |
|||
|
|||
.confirm { |
|||
width: 50%; |
|||
text-align: center; |
|||
color: #D62828; |
|||
line-height: 96rpx; |
|||
border-left: 1rpx solid #F0F0F0; |
|||
} |
|||
|
|||
.mask-content1 { |
|||
max-height: 710rpx; |
|||
position: relative; |
|||
z-index: 1; |
|||
width: 80%; |
|||
background: white; |
|||
border-radius: 12rpx; |
|||
/* margin-bottom: 45%; */ |
|||
overflow-y: auto; |
|||
margin: auto; |
|||
} |
|||
.change-date { |
|||
font-weight: 500; |
|||
font-size: 27rpx; |
|||
color: #0B898E; |
|||
} |
|||
.text1 { |
|||
margin-left: 21rpx; |
|||
font-weight: 400; |
|||
font-size: 23rpx; |
|||
color: #0B898E; |
|||
margin-bottom: 21rpx; |
|||
display: flex; |
|||
align-items: flex-end; |
|||
padding-bottom: 40rpx; |
|||
} |
|||
.text2 { |
|||
margin-left: 22rpx; |
|||
font-weight: 400; |
|||
font-size: 23rpx; |
|||
color: #666666; |
|||
padding-bottom: 41rpx; |
|||
} |
|||
.mask-content2 { |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
width: 100%; |
|||
background: white; |
|||
border-radius: 12rpx; |
|||
overflow-y: auto; |
|||
height: 1100rpx; |
|||
} |
|||
.bottom-box { |
|||
height: 133rpx; |
|||
background: #FFFFFF; |
|||
box-shadow: 0rpx -3rpx 8rpx 0rpx rgba(71,71,71,0.1); |
|||
padding: 0 50rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
bottom: 0; |
|||
} |
|||
.totalPrice { |
|||
font-family: PingFang SC; |
|||
font-weight: 500; |
|||
font-size: 48rpx; |
|||
color: #D62828; |
|||
} |
|||
.totalPrice::before { |
|||
content: "¥"; |
|||
font-size: 24rpx; |
|||
} |
|||
.next { |
|||
width: 250rpx; |
|||
height: 80rpx; |
|||
background: #D62828; |
|||
border-radius: 40rpx; |
|||
font-family: PingFang; |
|||
font-weight: bold; |
|||
font-size: 32rpx; |
|||
color: #FFFFFF; |
|||
text-align: center; |
|||
line-height: 80rpx; |
|||
} |
|||
.icon-close { |
|||
position: absolute; |
|||
top: 30rpx; |
|||
right: 30rpx; |
|||
} |
|||
.s-price { |
|||
font-weight: 500; |
|||
font-size: 36rpx; |
|||
color: #D62828; |
|||
margin-right: 17rpx; |
|||
} |
|||
.s-price::before { |
|||
content: "¥"; |
|||
font-size: 24rpx; |
|||
} |
|||
@ -0,0 +1,381 @@ |
|||
// pages/user/order/sceneOrderInfo/index.js
|
|||
import commonApi from "../../../../utils/https/common" |
|||
import userApi from "../../../../utils/https/user" |
|||
import QRCode from '../../../../utils/weapp-qrcode.js' |
|||
import util from '../../../../utils/util' |
|||
let app = getApp(),timer |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
id:null, |
|||
info:null, |
|||
orderState:app.globalData.orderState, |
|||
productState:app.globalData.productState, |
|||
product_model:null, |
|||
isRefund:false, |
|||
feeInfoFlag:false, |
|||
codeIndex:0, |
|||
codeImgs:[], |
|||
minute:0, |
|||
second:0, |
|||
cardTypes:{}, |
|||
cxr1:false, |
|||
cxr1Text:'更多', |
|||
sysm:false, |
|||
sysmText:'更多', |
|||
sysm2:false, |
|||
sysm2Text:'更多', |
|||
imgLen:[], |
|||
ids:[] |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
id:options.id |
|||
}) |
|||
userApi.user_post("user/getCardTypeList").then(res=>{ |
|||
let cardTypes = {}; |
|||
res.data.map(item=>{ |
|||
cardTypes[item.type]=item.title; |
|||
}) |
|||
this.setData({ |
|||
cardTypes:cardTypes |
|||
}) |
|||
}) |
|||
}, |
|||
copy:function(){ |
|||
wx.setClipboardData({ |
|||
data: this.data.codeImgs[this.data.codeIndex].code, |
|||
success: function (res) { |
|||
wx.showToast({ |
|||
title: '复制成功', |
|||
icon:'success' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
getCodeImg:function(){ |
|||
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[],codeId=0,arr = []; |
|||
this.data.info.order_product_list.forEach(qrcode=>{ |
|||
qrcode.qrcode.map((item,index)=>{ |
|||
console.log(qrcode.is_force_display_code); |
|||
item.is_force_display_code = qrcode.is_force_display_code |
|||
console.log(item.is_force_display_code); |
|||
arr.push(index) |
|||
this.setData({ |
|||
imgLen:arr |
|||
}) |
|||
if(item.use_url&&item.use_code){ |
|||
codeImgs.push({img:item.use_url,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state}); |
|||
// if(codeImgs.length==qrcode.qrcode.length){
|
|||
// that.setData({
|
|||
// codeImgs:codeImgs
|
|||
// })
|
|||
// }
|
|||
that.setData({ |
|||
codeImgs:codeImgs |
|||
}) |
|||
} |
|||
else { |
|||
console.log(item); |
|||
new QRCode('damocode'+codeId,{ |
|||
text: item.use_code, |
|||
width: 300 * radio, |
|||
height: 300 * radio, |
|||
padding:10, // 生成二维码四周自动留边宽度,不传入默认为0
|
|||
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
|
|||
callback: (res) => { |
|||
console.log(res); |
|||
codeImgs.push({img:res.path,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state}); |
|||
that.setData({ |
|||
codeImgs:codeImgs |
|||
}) |
|||
} |
|||
}) |
|||
console.log(this.data.codeImgs); |
|||
codeId = codeId + 1 |
|||
} |
|||
}) |
|||
}) |
|||
console.log(this.data.imgLen); |
|||
console.log(this.data.codeImgs); |
|||
}, |
|||
prevCodeImg:function(){ |
|||
let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex; |
|||
if(codeIndex==0){ |
|||
this.setData({ |
|||
codeIndex:qrcode.length-1 |
|||
}) |
|||
} |
|||
else { |
|||
this.setData({ |
|||
codeIndex:codeIndex-1 |
|||
}) |
|||
} |
|||
}, |
|||
nextCodeImg:function(){ |
|||
console.log(this.data.codeImgs); |
|||
let qrcode=this.data.codeImgs,codeIndex = this.data.codeIndex; |
|||
codeIndex = codeIndex + 1; |
|||
if(codeIndex==qrcode.length){ |
|||
codeIndex = 0; |
|||
} |
|||
this.setData({ |
|||
codeIndex:codeIndex |
|||
|
|||
}) |
|||
}, |
|||
showFeeInfo:function(){ |
|||
this.setData({ |
|||
feeInfoFlag:!this.data.feeInfoFlag |
|||
}) |
|||
}, |
|||
close:function(){ |
|||
let _this = this,info = _this.data.info; |
|||
wx.showModal({ |
|||
title:'提示', |
|||
content:"确定取消吗", |
|||
success:function(res){ |
|||
if(res.confirm){ |
|||
commonApi.user_post("order/close",{ |
|||
order_id:info.order_id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '取消成功', |
|||
icon:'success' |
|||
}) |
|||
info.state = "CLOSED"; |
|||
info.order_product_list.map(item=>{ |
|||
item.state='CLOSED' |
|||
}) |
|||
_this.setData({ |
|||
info:info |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
refund:function(){ |
|||
let _this = this,info = _this.data.info; |
|||
wx.showModal({ |
|||
title:'提示', |
|||
content:"确定取消吗", |
|||
success:function(res){ |
|||
if(res.confirm){ |
|||
commonApi.user_post("order/refund",{ |
|||
order_id:info.order_id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '取消成功', |
|||
icon:'success' |
|||
}) |
|||
info.state = "WAIT_REFUND"; |
|||
info.order_product_list.map(item=>{ |
|||
item.state='WAIT_REFUND' |
|||
}) |
|||
_this.setData({ |
|||
info:info |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
daojishi:function(time){ |
|||
let now = new Date().getTime(); |
|||
if(now>time){ |
|||
clearTimeout(timer); |
|||
timer = null; |
|||
util.back(); |
|||
return; |
|||
} |
|||
let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000); |
|||
this.setData({ |
|||
minute:util.formatNumber(minute), |
|||
second:util.formatNumber(second) |
|||
}) |
|||
timer = setTimeout(()=>{ |
|||
this.daojishi(time); |
|||
},1000) |
|||
}, |
|||
// 查看苏康码
|
|||
gotoSku:function(){ |
|||
commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{ |
|||
console.log(res) |
|||
app.globalData.weburl = res.data.url; |
|||
wx.navigateTo({ |
|||
url: '/pages/pbService/web/index' |
|||
}) |
|||
return; |
|||
}) |
|||
}, |
|||
goDetail(e){ |
|||
console.log(e.currentTarget.dataset); |
|||
let item = e.currentTarget.dataset.set |
|||
if (item.is_package) { |
|||
wx.navigateTo({ |
|||
url:"/pages/info/postProductInfo/index?id="+item.product_id |
|||
}) |
|||
return |
|||
} |
|||
|
|||
if (item.product_model=='ticket') { |
|||
wx.navigateTo({ |
|||
url:"/pages/info/sceneProductInfo/index?id="+item.scene_id |
|||
}) |
|||
}else if (item.product_model=='post') { |
|||
wx.navigateTo({ |
|||
url:"/pages/info/postProductInfo/index?id="+item.product_id |
|||
}) |
|||
} else if (item.product_model == 'show') { |
|||
wx.navigateTo({ |
|||
url:"/pages/info/showInfo/index?id="+item.product_id |
|||
}) |
|||
} |
|||
}, |
|||
showMsg(e){ |
|||
console.log(e.currentTarget.dataset); |
|||
let msg = e.currentTarget.dataset.msg |
|||
switch (msg) { |
|||
case 'cxr1': |
|||
this.setData({ |
|||
cxr1:!this.data.cxr1, |
|||
cxr1Text:this.data.cxr1?'更多':'收起', |
|||
|
|||
}) |
|||
break; |
|||
case 'sysm1': |
|||
this.setData({ |
|||
sysm:!this.data.sysm, |
|||
sysmText:this.data.sysm?'更多':'收起', |
|||
}) |
|||
break; |
|||
case 'sysm2': |
|||
this.setData({ |
|||
sysm2:!this.data.sysm2, |
|||
sysm2Text:this.data.sysm2?'更多':'收起', |
|||
}) |
|||
break; |
|||
default: |
|||
break; |
|||
} |
|||
}, |
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
commonApi.user_post("order/query",{ |
|||
order_id:this.data.id |
|||
}).then(res=>{ |
|||
if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){ |
|||
let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000); |
|||
this.daojishi(time); |
|||
} |
|||
let proId = [] |
|||
res.data.order_product_list.forEach(item => { |
|||
proId.push(item.product_id) |
|||
}) |
|||
let state = "" |
|||
res.data.order_product_list.map(order=>{ |
|||
order.qrcode.map(item=>{ |
|||
item.stateText = app.globalData.codeState[item.state]; |
|||
}) |
|||
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]; |
|||
state = state + order.state; |
|||
}) |
|||
this.setData({ |
|||
isRefund:state.indexOf("REFUND")!=-1, |
|||
info:res.data, |
|||
product_model:"ticket"||res.data.order_product_list[0].product_model, |
|||
ids: proId.join(",") |
|||
}) |
|||
console.log(res.data); |
|||
// debugger
|
|||
console.log('ids',this.data.ids); |
|||
this.getCodeImg() |
|||
// 获取行程规划
|
|||
let that = this; |
|||
wx.getLocation({ |
|||
type: 'gcj02', |
|||
success: function (r) { |
|||
let ajaxes=[]; |
|||
res.data.order_product_list.map(item=>{ |
|||
ajaxes.push(commonApi.user_post("order/tripplan",{ |
|||
point_type:"gd", |
|||
child_order_id:item.child_order_id, |
|||
lon:r.longitude, |
|||
lat:r.latitude |
|||
})) |
|||
}) |
|||
Promise.all(ajaxes).then(r=>{ |
|||
console.log(r) |
|||
let orderInfo = that.data.info; |
|||
r.map((item,index)=>{ |
|||
if(item && item.data && item.data.url){ |
|||
orderInfo.order_product_list[index].btnUrl = item.data.url; |
|||
} |
|||
}) |
|||
that.setData({ |
|||
info:orderInfo |
|||
}) |
|||
}) |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 行程规划
|
|||
leadRoad:function(e){ |
|||
let url = e.currentTarget.dataset.url; |
|||
app.globalData.weburl = url; |
|||
wx.navigateTo({ |
|||
url: '/pages/pbService/web/index' |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
clearTimeout(timer) |
|||
timer = null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,7 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader", |
|||
"sptj":"/pages/component/proRec/proRec", |
|||
"advBox":"/pages/component/orderAdv/orderAdv" |
|||
} |
|||
} |
|||
@ -0,0 +1,144 @@ |
|||
<!--pages/user/order/sceneOrderInfo/index.wxml--> |
|||
<wxs src="../../../../utils/filter.wxs" module="tool" /> |
|||
<title title="订单详情"></title> |
|||
<view class="top-bg"></view> |
|||
<canvas wx:for="{{imgLen}}" class="code-img" style="position:absolute;z-index:-1;" canvas-id="damocode{{index}}"></canvas> |
|||
<view class="state-text" wx:if="{{info}}">{{info.state_text}}</view> |
|||
|
|||
<view class="code-box box" wx:if="{{info && codeImgs.length>0}}"> |
|||
<view bindtap="prevCodeImg" class="iconfont icon-you-copy"></view> |
|||
<view wx:for="{{codeImgs}}" wx:if="{{index==codeIndex}}" style="position: relative;"> |
|||
<image src="{{item.img}}" mode="widthFix" style="width:300rpx;"></image> |
|||
<!-- 代表核销后是否继续展示二维码(0否1是) --> |
|||
<view class="text-shadow" wx:if="{{item.is_force_display_code != 1 && item.flag != 0}}"> |
|||
<view class="text-shadow-state"> |
|||
{{item.state}} |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view bindtap="nextCodeImg" class="iconfont icon-you"></view> |
|||
<view class="code-text">{{codeImgs[codeIndex].text}}:{{codeImgs[codeIndex].code}} <view class="copy-box" bindtap="copy">复制</view></view> |
|||
<view class="code-state">{{codeImgs[codeIndex].state}} {{codeIndex+1}}/{{codeImgs.length}}</view> |
|||
</view> |
|||
|
|||
<view wx:if="{{info && codeImgs.length>0}}"> |
|||
<advBox ids="{{ ids }}"></advBox> |
|||
</view> |
|||
|
|||
<sptj ids="{{ ids }}"></sptj> |
|||
|
|||
<!-- 景点订单详情需要这个 --> |
|||
<view class="box"> |
|||
<view class="scene-box"> |
|||
<view class="scene-box-left"> |
|||
<view wx:if="{{info.state=='UNPAID'}}">库存有限,请尽快完成付款</view> |
|||
<view wx:if="{{info.state=='CLOSED' || info.state=='REFUND'}}">您的订单已取消,您可以通过苏州文旅总入口再次预订</view> |
|||
<view wx:if="{{info.order_product_list[0].state=='WAIT_USE'}}">预定已成功,祝您出游愉快</view> |
|||
<view>订单号:{{info.order_id}}</view> |
|||
<view>下单时间:{{info.create_time}}</view> |
|||
|
|||
</view> |
|||
<view class="scene-box-right"> |
|||
<view class="price">¥{{info.paid_money/100}}</view> |
|||
<view bindtap="showFeeInfo">费用明细</view> |
|||
</view> |
|||
</view> |
|||
<view class="scene-btns" wx:if="{{info.state!='CLOSED'}}"> |
|||
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view> |
|||
<view wx:if="{{info.state!='UNPAID'}}"> |
|||
<navigator wx:if="{{info.order_product_list[0].is_package}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> |
|||
|
|||
<navigator wx:else url="/pages/info/showInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> |
|||
</view> |
|||
|
|||
<!-- <view bindtap="leadRoad" data-url="{{info.order_product_list[0].btnUrl}}" class="btn" wx:if="{{info.state!='UNPAID' && !isRefund}}">行程规划</view> --> |
|||
<navigator url="../refundInfo/index?id={{info.order_id}}" class="scene-btn" wx:if="{{isRefund}}">退款详情</navigator> |
|||
<view class="scene-btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消预订</view> |
|||
<view class="scene-btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消预订</view> |
|||
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="scene-btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator> |
|||
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator> |
|||
</view> |
|||
</view> |
|||
<!--景点订单详情需要这个 --> |
|||
<view class="box" wx:for="{{info.order_product_list}}" wx:for-index='index'> |
|||
<view class="scene-box" style="align-items:center"> |
|||
<view class="scene-box-left" style="width:630rpx"> |
|||
<view class="box-title" bindtap="goDetail" data-set='{{item}}'> |
|||
<view class="title-content">{{item.product_title}}</view> |
|||
<view class="iconfont icon-you"></view> |
|||
</view> |
|||
<view class="detail-item"> |
|||
<text>{{item.sku_name}}</text> |
|||
<text>x{{item.product_num}}</text> |
|||
</view> |
|||
<view class="childStatus" style="text-align: left;font-size: 30rpx; font-weight:bold;padding-bottom: 30rpx;color: #0b898e"> |
|||
{{ item.state_text }} |
|||
</view> |
|||
<view class="row" wx:if="{{ !item.order_advance.id}}"> |
|||
<view>场次:</view> |
|||
<view>{{item.use_date}} <text style="padding-left: 20rpx;" wx:if="{{item.start_time && item.end_time}}">{{ item.start_time }}-{{ item.end_time }}</text> </view> |
|||
</view> |
|||
|
|||
<view class="row" wx:if="{{ item.order_advance.id}}"> |
|||
<view>使用日期:</view> |
|||
<view>{{ item.order_advance.start_time }}-{{ item.order_advance.end_time }}</view> |
|||
</view> |
|||
<view > |
|||
<view class="box-title tflex"> |
|||
<view>出行人信息</view> |
|||
<view bindtap="showMsg" data-msg="cxr1" style="color: rgb(49, 154, 158);">{{cxr1Text}}</view> |
|||
</view> |
|||
<view wx:if="{{item.sku_model.is_authentication == 0}}"> |
|||
<view class="detail-item"> |
|||
<text>手机号: {{item.phone}}</text> |
|||
</view> |
|||
</view> |
|||
<view wx:else> |
|||
<view wx:if="{{cxr1}}" wx:for="{{item.contacts_info}}"> |
|||
<view class="line" wx:if="{{index!=0}}"></view> |
|||
<view class="detail-item"> |
|||
<text>姓名: {{item.name}}</text> |
|||
<!-- <text>¥168</text> --> |
|||
</view> |
|||
<view class="detail-item"> |
|||
<text>{{cardTypes[item.idcard_type]}}:{{item.id_number}}</text> |
|||
<!-- <text>-¥10</te、xt> --> |
|||
</view> |
|||
<view class="detail-item"> |
|||
<text>手机号: {{item.tel}}</text> |
|||
<!-- <text>-¥10</text> --> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view > |
|||
<view class="box-title tflex"> |
|||
<view>使用说明</view> |
|||
<view bindtap="showMsg" data-msg="sysm1" style="color: rgb(49, 154, 158);">{{sysmText}}</view> |
|||
</view> |
|||
<rich-text wx:if="{{sysm}}" class="detail-item" style="display:block" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text> |
|||
</view> |
|||
<view wx:if="{{item.product_model=='post'}}"> |
|||
<view class="box-title tflex"> |
|||
<view>使用说明</view> |
|||
<view bindtap="showMsg" data-msg="sysm2" style="color: rgb(49, 154, 158);">{{sysm2Text}}</view> |
|||
</view> |
|||
<rich-text wx:if="{{sysm2}}" class="detail-item" style="display:block" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<navigator wx:if="{{info && info.state!='CLOSED'}}" url="/pages/user/service/index" class="bottom-btn"> |
|||
<image src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服 |
|||
</navigator> |
|||
<view class="mask" wx:if="{{feeInfoFlag}}"> |
|||
<view class="mask-bg" bindtap="showFeeInfo"></view> |
|||
<view class="mask-content"> |
|||
<view class="mask-title">费用明细</view> |
|||
<view class="iconfont icon-close" bindtap="showFeeInfo"></view> |
|||
<view class="mask-item"><text>商品总价</text><text>¥{{info.total_money/100}}</text></view> |
|||
<view class="mask-item"><text>优惠券抵扣</text><text>-¥{{info.preference_money/100}}</text></view> |
|||
<view class="mask-item"><text>订单实付</text><text>¥{{info.paid_money/100}}</text></view> |
|||
</view> |
|||
</view> |
|||
@ -0,0 +1,354 @@ |
|||
/* pages/user/order/sceneOrderInfo/index.wxss */ |
|||
.top-bg { |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
height: 280rpx; |
|||
background: linear-gradient(180deg, #0B898E, #0B898E, rgba(237, 237, 237, 0)); |
|||
z-index: -1; |
|||
} |
|||
page { |
|||
background: #f6f6f6; |
|||
} |
|||
.state-text { |
|||
margin: 20rpx 30rpx; |
|||
line-height: 100rpx; |
|||
color: #fff; |
|||
font-size: 48rpx; |
|||
} |
|||
.box { |
|||
padding: 20rpx; |
|||
background: white; |
|||
border-radius: 20rpx; |
|||
margin: 20rpx 30rpx; |
|||
} |
|||
.product-info { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
color: #333; |
|||
font-size: 24rpx; |
|||
padding-bottom: 20rpx; |
|||
border-bottom: 1rpx solid #d8d8d8; |
|||
margin-bottom: 10rpx; |
|||
} |
|||
.product-info image { |
|||
width: 140rpx; |
|||
height: 140rpx; |
|||
border-radius: 10rpx; |
|||
flex-shrink: 0; |
|||
} |
|||
.title-box { |
|||
flex: 1; |
|||
margin: 0 20rpx; |
|||
} |
|||
.title-box .title { |
|||
font-size: 30rpx; |
|||
width: 100%; |
|||
margin-bottom: 10rpx; |
|||
} |
|||
.title-box .subtitle { |
|||
color: #888888; |
|||
font-size: 26rpx; |
|||
} |
|||
.price-box-tip { |
|||
text-align: right; |
|||
} |
|||
.detail-item { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
min-height: 45rpx; |
|||
color: #000; |
|||
font-size: 30rpx; |
|||
padding-bottom:30rpx ; |
|||
} |
|||
.all-total-item { |
|||
font-weight: bold; |
|||
height: 70rpx; |
|||
border-bottom: 1rpx solid #d8d8d8; |
|||
} |
|||
.all-total-item .price { |
|||
color: #D62828; |
|||
font-size: 36rpx; |
|||
} |
|||
.all-total-item .price::before { |
|||
content: "¥"; |
|||
font-size: 26rpx; |
|||
} |
|||
.btns { |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
height: 103rpx; |
|||
font-size: 26rpx; |
|||
} |
|||
.btn { |
|||
width: 160rpx; |
|||
line-height: 60rpx; |
|||
background: #fff; |
|||
text-align: center; |
|||
box-sizing: border-box; |
|||
border: 1rpx solid #d8d8d8; |
|||
border-radius: 30rpx; |
|||
text-align: center; |
|||
margin-left: 20rpx; |
|||
} |
|||
.btn.active { |
|||
color: #fff; |
|||
background: #FC9132; |
|||
border-color: #FC9132; |
|||
} |
|||
.box-title { |
|||
font-size: 30rpx; |
|||
font-weight: bold; |
|||
margin-bottom: 10rpx; |
|||
display: flex; |
|||
text-align: center; |
|||
justify-content: space-between; |
|||
} |
|||
.box-title.tflex{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.title-content{ |
|||
overflow-x: hidden; |
|||
overflow-y: inherit; |
|||
text-overflow: ellipsis; |
|||
white-space: nowrap; |
|||
} |
|||
.scene-box { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
} |
|||
.scene-box-left { |
|||
width: 400rpx; |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
} |
|||
.scene-box-right { |
|||
flex-shrink: 0; |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
text-align: right; |
|||
} |
|||
.scene-box-right .price { |
|||
color: #D62828; |
|||
font-size: 36rpx; |
|||
font-weight: bold; |
|||
} |
|||
.scene-btns { |
|||
display: flex; |
|||
justify-content: flex-end; |
|||
align-items: center; |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
text-align: center; |
|||
margin-top: 50rpx; |
|||
} |
|||
.scene-btn { |
|||
width: 160rpx; |
|||
line-height: 60rpx; |
|||
box-sizing: border-box; |
|||
border: 1rpx solid #d8d8d8; |
|||
border-radius: 30rpx; |
|||
margin-left: 20rpx; |
|||
flex-shrink: 0; |
|||
} |
|||
.scene-rest-time { |
|||
flex: 1; |
|||
text-align: left; |
|||
font-size: 26rpx; |
|||
font-weight: bold; |
|||
} |
|||
.scene-btn.active { |
|||
color: #fff; |
|||
background: #FC9132; |
|||
border-color: #FC9132; |
|||
} |
|||
.scene-btn.active1 { |
|||
background: #0B898E; |
|||
border-color: #0B898E; |
|||
color: #fff; |
|||
} |
|||
.bottom-btn { |
|||
display: flex; |
|||
width: 360rpx; |
|||
height: 80rpx; |
|||
background: #FFFFFF; |
|||
border-radius: 40rpx; |
|||
justify-content: center; |
|||
align-items: center; |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
font-weight: 500; |
|||
margin: 20rpx auto; |
|||
} |
|||
.bottom-btn image { |
|||
width: 40rpx; |
|||
margin-right: 10rpx; |
|||
} |
|||
.line { |
|||
margin: 10rpx 0; |
|||
height: 1rpx; |
|||
background: #d8d8d8; |
|||
} |
|||
.mask-title { |
|||
text-align: center; |
|||
padding-top: 30rpx; |
|||
margin-bottom: 60rpx; |
|||
font-weight: 500; |
|||
} |
|||
.mask-item { |
|||
margin: 0 40rpx; |
|||
margin-bottom: 60rpx; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
font-size: 30rpx; |
|||
color: #333; |
|||
} |
|||
.icon-close { |
|||
position: absolute; |
|||
right: 20rpx; |
|||
top: 30rpx; |
|||
} |
|||
.code-box { |
|||
text-align: center; |
|||
height: 440rpx; |
|||
position: relative; |
|||
} |
|||
.code-box .iconfont { |
|||
position: absolute; |
|||
color: #0B898E; |
|||
font-size: 30rpx; |
|||
line-height: 50rpx; |
|||
width: 50rpx; |
|||
left: 40rpx; |
|||
text-align: center; |
|||
margin-top: 125rpx; |
|||
} |
|||
.code-box .iconfont.icon-you { |
|||
left: auto; |
|||
right: 40rpx; |
|||
top: 20rpx; |
|||
} |
|||
.code-img { |
|||
width: 300rpx; |
|||
height: 300rpx; |
|||
display: block; |
|||
margin: 0 auto; |
|||
position: absolute; |
|||
left: -1000rpx; |
|||
top: -400rpx; |
|||
} |
|||
.code-state { |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
.code-text { |
|||
color: #0B898E; |
|||
font-size: 30rpx; |
|||
font-weight: 500; |
|||
margin: 25rpx; |
|||
display: flex; |
|||
justify-content: center; |
|||
} |
|||
.code-btn { |
|||
width: 220rpx; |
|||
line-height: 60rpx; |
|||
background: #FFFFFF; |
|||
border: 1rpx solid #D8D8D8; |
|||
border-radius: 30rpx; |
|||
box-sizing: border-box; |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
margin: 0 auto; |
|||
} |
|||
.hotel-tel-box { |
|||
line-height: 80rpx; |
|||
border-top: 1rpx solid #D8D8D8; |
|||
color: #0B898E; |
|||
font-size: 26rpx; |
|||
margin-top: 20rpx; |
|||
} |
|||
.hotel-tel-box .iconfont { |
|||
margin-right: 20rpx; |
|||
font-size: 34rpx; |
|||
} |
|||
.hotel-tips { |
|||
display: flex; |
|||
align-items: center; |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
} |
|||
.hotel-tips .hotel-days-num { |
|||
width: 70rpx; |
|||
font-size: 20rpx; |
|||
line-height: 30rpx; |
|||
border: 1rpx solid #0B898E; |
|||
border-radius: 15rpx; |
|||
text-align: center; |
|||
color: #0B898E; |
|||
margin: 0 20rpx; |
|||
text-align: center; |
|||
box-sizing: border-box; |
|||
} |
|||
.hotel-tips .hotel-date { |
|||
font-size: 26rpx; |
|||
color: #333; |
|||
margin-right: 6rpx; |
|||
} |
|||
.hotel-tip { |
|||
font-size: 24rpx; |
|||
color: #999; |
|||
margin-top: 30rpx; |
|||
} |
|||
.row{ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content:space-between; |
|||
padding-bottom: 30rpx; |
|||
} |
|||
.showmsg{ |
|||
display: none; |
|||
} |
|||
.btn{ |
|||
float: right; |
|||
} |
|||
.text-shadow { |
|||
position: absolute; |
|||
left: 0; |
|||
right: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
margin: auto; |
|||
text-align: center; |
|||
background: rgba(0, 0, 0, .3); |
|||
width: 300rpx; |
|||
height: 300rpx; |
|||
/*border-radius: .3rem;*/ |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
z-index: 10; |
|||
} |
|||
.text-shadow-state { |
|||
width: 200rpx; |
|||
height: 200rpx; |
|||
line-height: 200rpx; |
|||
background: #FFFFFF; |
|||
border-radius: 50%; |
|||
color: #0B898E; |
|||
} |
|||
.copy-box { |
|||
width: 73rpx; |
|||
line-height: 35rpx; |
|||
border-radius: 7rpx; |
|||
border: 1rpx solid #09898C; |
|||
margin-left: 15rpx; |
|||
text-align: center; |
|||
font-weight: 500; |
|||
font-size: 23rpx; |
|||
color: #0E8790; |
|||
} |
|||
Loading…
Reference in new issue