Browse Source

详情页

master
shaojing 2 years ago
parent
commit
ab319c746f
  1. 20
      pages/info/museumInfo/index.js
  2. 1659
      pages/info/sceneProductInfo/index.js
  3. 4
      pages/info/sceneProductInfo/index.json
  4. 37
      pages/info/sceneProductInfo/index.wxml
  5. 108
      pages/info/sceneProductInfo/index.wxss
  6. 5
      pages/order/components/contact/index.wxml
  7. 4
      pages/order/components/contact/index.wxss
  8. 57
      pages/order/components/date/index.js
  9. 45
      pages/order/components/date/index.wxml
  10. 54
      pages/order/components/date/index.wxss
  11. 51
      pages/order/scene/index.js
  12. 6
      pages/order/scene/index.json
  13. 66
      pages/order/scene/index.wxml
  14. 133
      pages/order/scene/index.wxss

20
pages/info/museumInfo/index.js

@ -28,7 +28,9 @@ Page({
shareImg: null,
showShareFlag: false,
showQrCode:false,
wxqrcode:null
wxqrcode:null,
date: "",
time: "",
},
/**
@ -77,6 +79,20 @@ Page({
})
this.getAct()
},
// 获取日期
changeDate: function (e) {
this.setData({
date: e.detail
})
console.log(this.data.date);
},
// 获取分时
changeTime: function (e) {
this.setData({
time: e.detail
})
console.log(this.data.time);
},
getAct: function () {
if (this.data.actList.length >= this.data.actTotal || this.data.isGroup == 1) return;
commonApi._post('scene/get_scene_act_list', {
@ -464,6 +480,8 @@ Page({
isGroup: this.data.isGroup,
isTeam: this.data.info.team_order && this.data.isGroup?1:0
}
app.globalData.product.date = this.data.date
app.globalData.product.time = this.data.time
app.globalData.index = 0
wx.navigateTo({
url: '/pages/order/scene/index?type=museum'

1659
pages/info/sceneProductInfo/index.js

File diff suppressed because it is too large

4
pages/info/sceneProductInfo/index.json

@ -2,8 +2,8 @@
"usingComponents": {
"title":"/pages/component/TitleHeader",
"notice":"/pages/component/notice/notice",
"code":"../../order/components/wxqrCode/index"
"code":"/pages/order/components/wxqrCode/index",
"date":"/pages/order/components/date"
}
}

37
pages/info/sceneProductInfo/index.wxml

@ -2,12 +2,7 @@
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="景点详情"></title>
<view class="iconfont icon-fenxiang" bindtap="share"></view>
<!-- <view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}" bindtap="like"></view> -->
<image wx:for="{{info.product}}" style="{{aniSkuIndex==index?('top:689px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{item.headimg}}" mode="aspectFill"></image>
<!-- <view class="audio-box" bindtap="audioGuide">
<view>语音导览</view>
<image src="https://static.ticket.sz-trip.com/xcxImages/info/play-btn.png" mode="widthFix"></image>
</view> -->
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}" duration="{{300}}">
<block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item>
@ -20,7 +15,6 @@
<view class="tags-box textOver">
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view>
</view>
<!-- <view class="tags-text">详情 <text class="iconfont icon-you"></text></view> -->
</view>
<view class="tags-box address-box" style="height:auto">
<view class="info-address">开园时间:{{info.open_time}}</view>
@ -51,10 +45,11 @@
<view class="order-tip-text" bindtap="showBookingInfo" data-item="{{sku}}">预订须知>></view>
</view>
<view class="product-right">
<view class="price"><text>¥</text><text>{{sku.price?sku.price/100:0}}</text><text>起</text></view>
<!-- <view bindtap="order" data-sku="{{sku}}" data-product="{{item}}"
<view class="price"><text>¥</text><text>{{sku.price?sku.price/100:0}}</text></view>
<!-- showOrder selectDate -->
<view bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}"
class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">立即预订</view> -->
class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">预订</view>
</view>
</view>
</view>
@ -70,7 +65,7 @@
<view style="flex:1"></view>
<view class="btns">
<view class="btn" bindtap="showCart" wx:if="{{info.product[0].type!='line'}}">加入购物车</view>
<view class="btn {{info.product[0].type=='line' ? 'btn-r':''}}" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即预订</view>
<!-- <view class="btn {{info.product[0].type=='line' ? 'btn-r':''}}" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即预订</view> -->
<view class="btn disable" wx:elif="{{info}}">该商品已下架</view>
</view>
</view>
@ -110,7 +105,25 @@
</view>
</view>
</view> -->
<view class="mask" wx:if="{{skuFlag}}">
<!-- 日期弹框 -->
<!-- <date-popup wx:if="{{showDate}}"></date-popup> -->
<view class="mask" wx:if="{{showDate}}">
<view class="mask-bg" bindtap="hideDate"></view>
<view class="mask-content1">
<view class="iconfont icon-close" bindtap="hideDate"></view>
<date bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date>
<view class="bottom-box">
<view>
合计: <text class="totalPrice">{{showPrice/100}}</text>
</view>
<view class="next" bindtap="order" data-sku="{{sku}}" data-product="{{item}}">
下一步
</view>
</view>
</view>
</view>
<!-- 规格弹框 -->
<view class="mask" wx:if="{{skuFlag == 'cart'}}">
<view class="mask-bg" bindtap="hideSku"></view>
<view class="mask-content">
<view class="iconfont icon-close" bindtap="hideSku"></view>
@ -137,6 +150,8 @@
<view class="btn-box">
<view class="mask-btn" bindtap="order" data-product="{{item}}" wx:if="{{info && info.flag==1}}">{{skuFlag=='cart'?'确认':'立即购买'}}
</view>
<!-- <view class="mask-btn" bindtap="order" data-product="{{item}}" wx:if="{{info && info.flag==1}}">{{skuFlag=='cart'?'确认':'立即购买'}}
</view> -->
<view class="mask-btn disable" wx:else>该商品已下架</view>
</view>
</view>

108
pages/info/sceneProductInfo/index.wxss

@ -89,13 +89,13 @@ page {
.box {
margin: 20rpx;
background: white;
/* background: white; */
border-radius: 13rpx;
}
.box-top {
line-height: 95rpx;
border-bottom: 1rpx solid #d9d9d9;
/* border-bottom: 1rpx solid #d9d9d9; */
font-weight: 500;
color: #000;
font-size: 35rpx;
@ -103,22 +103,27 @@ page {
}
.product-item {
margin: 0 20rpx;
padding: 27rpx 0;
border-bottom: 1rpx solid #ccc;
/* margin: 0 20rpx; */
padding: 33rpx 26rpx 30rpx;
/* border-bottom: 1rpx solid #ccc; */
background-color: rgba(11,137,142, .06);
border-radius: 13rpx;
margin-bottom: 18rpx;
}
.skutitle {
font-size: 29rpx;
color: #333;
font-family: PingFang SC;
font-weight: 500;
font-size: 31rpx;
color: #000000;
}
.product-box {
display: flex;
align-items: flex-end;
justify-content: space-between;
margin-top: 20rpx;
margin-top: 13rpx;
/* margin-top: 20rpx; */
}
.product-left {
@ -131,13 +136,17 @@ page {
}
.product-tag {
font-size: 20rpx;
/* font-size: 20rpx;
color: #0B898E;
border-radius: 16rpx;
line-height: 30rpx;
border: 1rpx solid;
padding: 0 15rpx;
border: 1rpx solid; */
/* padding: 0 15rpx; */
margin-right: 13rpx;
font-family: PingFang SC;
font-weight: 400;
font-size: 23rpx;
color: #666666;
}
.product-tags .product-tags:last-child {
@ -145,25 +154,33 @@ page {
}
.order-tip-text {
margin-top: 33rpx;
/* margin-top: 33rpx;
font-size: 24rpx;
color: #666;
color: #666; */
font-weight: 400;
font-size: 23rpx;
color: #0B898E;
margin-top: 18rpx;
}
.product-right {
text-align: center;
flex-shrink: 0;
display: flex;
align-items: center;
}
.product-right .price {
font-weight: 500;
color: #D62828;
font-size: 24rpx;
margin-bottom: 20rpx;
/* margin-bottom: 20rpx; */
margin-right: 19rpx;
}
.product-right .price text:nth-child(2) {
font-weight: 500;
font-size: 33rpx;
font-size: 36rpx;
}
.product-right .price text:nth-child(3) {
@ -172,13 +189,22 @@ page {
}
.product-right .btn {
background: #D62828;
/* background: #D62828;
color: #fff;
border-radius: 30px;
line-height: 60rpx;
font-size: 29rpx;
font-weight: 500;
width: 176rpx;
width: 176rpx; */
width: 93rpx;
height: 80rpx;
background: #0B898E;
border-radius: 13rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
text-align: center;
line-height: 80rpx;
}
.product-right .btn.disable {
@ -581,7 +607,7 @@ page {
.btns .btn:nth-child(1) {
margin-right: 3rpx;
border-radius: 39rpx 0 0 39rpx;
border-radius: 39rpx;
}
.btns .btn:nth-child(2) {
@ -843,4 +869,50 @@ page {
}
.btn-r{
border-radius: 39rpx !important;
}
.totalPrice {
font-family: PingFang SC;
font-weight: 500;
font-size: 48rpx;
color: #D62828;
}
.totalPrice::before {
content: "¥";
font-size: 24rpx;
}
.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;
}
.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;
}
.mask-content1 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background: white;
border-radius: 12rpx;
overflow-y: auto;
}
.icon-close {
position: absolute;
top: 30rpx;
right: 30rpx;
}

5
pages/order/components/contact/index.wxml

@ -56,6 +56,9 @@
<view class="contact-item" wx:for="{{seldManList}}" wx:if="{{seldManList.length>0}}">
<view class="iconfont icon-jian" bindtap="delLinkman" data-index="{{index}}" data-item="{{item}}"></view>
<view style="font-weight: 400;font-size: 27rpx;color: #000000;margin-left: 26rpx;">
出行人{{index+1}}
</view>
<view class="contact-info">
<view class="contact-name">{{item.name}}</view>
<view class="contact-other" style="margin-bottom:10rpx"><text>手机号</text>{{item.tel}}</view>
@ -64,7 +67,7 @@
<view bindtap="gotoEdit" data-item="{{item}}" class="iconfont icon-bianji1"></view>
<!-- <navigator bindtap="gotoEdit" data-item="{{item}}" url="/pages/user/linkman/add/index?id={{item.id}}&from=order" class="iconfont icon-bianji1"></navigator> -->
</view>
<view wx:if="{{is_real_name=='1'}}">
<view wx:if="{{is_real_name=='1'}}" style="margin-left: -20rpx;">
<view class="text1" bindtap="addMask" wx:for="{{productNum}}" wx:for-index="index" wx:if="{{index > (seldManList.length -1)}}">
<view style="display: flex;align-items: center;">

4
pages/order/components/contact/index.wxss

@ -14,7 +14,7 @@
padding: 42rpx 20rpx 18rpx;
}
.contact-item {
padding: 30rpx 0;
padding: 30rpx 20rpx;
/* border-bottom: 1rpx solid #ccc; */
display: flex;
align-items: center;
@ -33,7 +33,7 @@
text-align: left;
color: #666666;
font-size: 25rpx;
margin: 0 60rpx;
margin: 0 30rpx;
}
.contact-item .contact-name {
font-size: 28rpx;

57
pages/order/components/date/index.js

@ -40,12 +40,17 @@ Component({
today:util.formatDate(new Date()),
tomorrow:util.formatMing(new Date()),
afterTom:util.formatHou(new Date()),
skuName:'',
monthList:[]
},
lifetimes: {
attached: function () {
console.log(app.globalData.product);
let skuName = app.globalData.product.sku.sku_name
this.setData({
kjIdCom: app.globalData.kjId,
gpIdCom: app.globalData.gp_id || app.globalData.team_id
gpIdCom: app.globalData.gp_id || app.globalData.team_id,
skuName
})
// 在组件实例进入页面节点树时执行
let product = app.globalData.product, today = util.formatDate(new Date()), end_date = util.formatDate(new Date(new Date().getTime() + 60 * 24 * 60 * 60 * 1000));
@ -107,11 +112,32 @@ Component({
this.setData({
datelist: res.data
})
res.data.forEach(item=> {
item.short_date = item.date.split("-").splice(1, 2).join("-")
item.week = this.getDay(item.date)
})
let seldDate = ''
if (app.globalData.product.changeFlag) {
res.data.forEach(item=> {
if (item.date == app.globalData.product.date.date) {
seldDate = item
}
})
setTimeout(() => {
this.changeDate(seldDate)
})
// this.setData({
// activeDate:seldDate
// })
// this.getTimeStock()
}
this.setData({
threeDays: res.data.slice(0, 3)
threeDays: res.data.slice(0, 3),
monthList: res.data.slice(0, 30),
})
console.log(this.data.monthList);
let index = this.data.threeDays.findIndex(item => item.date == this.data.activeDate.date)
console.log(this.data.activeDate);
this.setData({
moreFlag: index != -1
})
@ -136,6 +162,11 @@ Component({
* 组件的方法列表
*/
methods: {
getDay: function (date) {
let d = new Date(date.replace(/-/g, '/')).getDay();
let days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
return days[d];
},
showMoreDate: function () {
this.setData({
showMoreDateFlag: true
@ -147,7 +178,7 @@ Component({
})
},
changeDate: function (e) {
let date = e.currentTarget.dataset.date;
let date = e.currentTarget ? e.currentTarget.dataset.date : e
if (date.stock <= 0) return;
if (date.stock == null) return;
if (date.price == null) return;
@ -179,7 +210,10 @@ Component({
this.getTimeStock()
},
getTimeStock: function () {
if (this.data.activeDate.is_time_stock != true) return;
if (this.data.activeDate.is_time_stock != true) {
this.triggerEvent("onChangeTime", '')
return
};
commonApi.user_post("product/product_timestock_price", {
date: this.data.activeDate.date,
sku_id: this.data.activeDate.sku_id ? this.data.activeDate.sku_id : app.globalData.product.sku.id
@ -195,9 +229,18 @@ Component({
return;
}
for (let i = 0; i < res.data.length; i++) {
if (res.data[i].stock_number > 0) {
timeIndex = i;
break;
if (app.globalData.product.changeFlag) {
if (res.data[i].start_time == app.globalData.product.time.start_time) {
timeIndex = i;
break;
}
} else {
timeIndex = i;
break;
}
}
}
this.setData({

45
pages/order/components/date/index.wxml

@ -1,13 +1,12 @@
<!--pages/order/components/date/index.wxml-->
<wxs src="../../../../utils/filter.wxs" module="tool" />
<view class="date-box">
<!-- <view class="date-box">
<view class="box-title">使用日期</view>
<view class="dates-boxes">
<view bindtap="changeDate" data-date="{{item}}" class="date-item{{activeDate.date==item.date?' active':''}}{{(item.stock<=0 || item.stock==null || item.price==null)?' disable':''}}" wx:for-index="index" wx:for="{{threeDays}}">
<view>{{tool.showAllSeldDate(item.date,index,today,tomorrow,afterTom)}}</view>
<view class="price" wx:if="{{ !isTeam && item.stock==-1 || item.stock==null}}">不可定</view>
<view class="price" wx:elif="{{ !isTeam && item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view>
<!-- <view class="price" wx:if="{{item.stock==null || item.price==null}}">不可定</view> -->
<view class="price" wx:if="{{item.stock==0}}">{{item.tipText?item.tipText:'售罄'}}</view>
</view>
<view wx:if="{{moreFlag || !activeDate}}" class="date-item more-item" bindtap="showMoreDate">
@ -21,6 +20,48 @@
<view class="date-times" wx:if="{{timelist.length>0}}">
<view bindtap="selectTime" data-index="{{index}}" wx:for="{{timelist}}" class="textOver date-time{{timeIndex==index?' active':''}}{{item.stock_number>0?'':' disable'}}">{{item.start_time}}-{{item.end_time}}<text wx:if="{{(item.stock_number>=10)}}"> 有票</text><text wx:elif="{{item.stock_number==0}}"> 售罄</text><text wx:elif="{{item.stock_number==-1}}"> 不可定</text><text wx:else>({{'余票'+item.stock_number}})</text></view>
</view>
</view> -->
<view class="date-box">
<view class="box-title">{{skuName}}</view>
<view style="border-top: 1rpx solid #ccc;padding: 48rpx 0 0 21rpx;">
<view style="font-weight: 500;font-size: 31rpx;color: #000000;">
使用日期
</view>
<view class="dates-boxes">
<view style="width: 580rpx;display: flex;overflow-x: scroll;">
<view bindtap="changeDate" data-date="{{item}}" class="date-item{{activeDate.date==item.date?' active':''}}{{(item.stock<=0 || item.stock==null || item.price==null)?' disable':''}}" wx:for-index="index" wx:for="{{monthList}}">
<!-- <view>{{tool.showAllSeldDate(item.date,index,today,tomorrow,afterTom)}}</view> -->
<view>{{item.week}}</view>
<view class="short-date">{{item.short_date}}</view>
<view class="price" wx:if="{{ !isTeam && item.stock==-1 || item.stock==null}}">不可定</view>
<view class="price" wx:elif="{{ !isTeam && item.stock!=0 && item.stock!=null && item.price!=null}}">{{item.price==0 || kjIdCom?'免费':('¥'+item.price/100)}}</view>
<!-- <view class="price" wx:if="{{item.stock==null || item.price==null}}">不可定</view> -->
<view class="price" wx:if="{{item.stock==0}}">{{item.tipText?item.tipText:'售罄'}}</view>
</view>
</view>
<view wx:if="{{moreFlag || !activeDate}}" class="more-item" bindtap="showMoreDate">
<!-- <view wx:if="{{moreFlag || !activeDate}}" class="date-item more-item" bindtap="showMoreDate"> -->
<view style="width:58rpx;margin-right:12rpx;">
更多日期
</view>
<view>
>
</view>
</view>
<view wx:else class="date-item more-item active" bindtap="showMoreDate">
<view>{{activeDate.short_date}}</view>
<view class="price">{{activeDate.price==0 || kjIdCom?'免费':('¥'+activeDate.price/100)}}</view>
</view>
</view>
</view>
<view wx:if="{{timelist.length>0}}">
<view style="margin-top: 10rpx;padding-left: 18rpx;">
选择时段
</view>
<view class="date-times" wx:if="{{timelist.length>0}}">
<view bindtap="selectTime" data-index="{{index}}" wx:for="{{timelist}}" class="textOver date-time{{timeIndex==index?' active':''}}{{item.stock_number>0?'':' disable'}}">{{item.start_time}}-{{item.end_time}}<text wx:if="{{(item.stock_number>=10)}}"> 有票</text><text wx:elif="{{item.stock_number==0}}"> 售罄</text><text wx:elif="{{item.stock_number==-1}}"> 不可定</text><text wx:else>({{'余票'+item.stock_number}})</text></view>
</view>
</view>
<!-- <view class="date-times" wx:elif="{{activeDate.is_time_stock}}">
<view>已售罄</view>
</view> -->

54
pages/order/components/date/index.wxss

@ -16,14 +16,15 @@
.dates-boxes {
display: flex;
align-items: center;
padding: 31rpx 21rpx;
border-top: 1rpx solid #ccc;
padding: 31rpx 0;
/* padding: 31rpx 21rpx; */
/* border-top: 1rpx solid #ccc; */
}
.date-item {
width: 162rpx;
height: 97rpx;
width: 120rpx;
height: 133rpx;
border-radius: 10rpx;
border: 1rpx solid #333;
/* border: 1rpx solid #333; */
text-align: center;
font-size: 27rpx;
color: #000;
@ -32,6 +33,8 @@
justify-content: center;
align-items: center;
flex-direction: column;
background: #F5F5F5;
flex-shrink: 0;
}
.date-item.active {
border-color: #0B898E;
@ -40,7 +43,7 @@
}
.date-item.disable {
border-color: #CCCCCC;
color: #666;
color: #999;
}
.date-item .price {
font-size: 25rpx;
@ -49,12 +52,27 @@
.date-item.active .price {
color: #fff;
}
.date-item.active view {
color: #fff;
}
.date-item.disable .price {
color: #666;
color: #999;
}
.date-item.disable .short-date {
color: #999;
}
.more-item {
width: 99rpx;
margin-right: 0;
/* width: 125rpx; */
/* 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;
@ -63,23 +81,28 @@
margin: 0 21rpx;
padding-top: 34rpx;
padding-bottom: 10rpx;
border-top: 1rpx dashed #ccc;
/* border-top: 1rpx dashed #ccc; */
flex-wrap: wrap;
}
.date-time {
width: 315rpx;
line-height: 58rpx;
border: 1px solid #333;
/* 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;
/* border-color: #ccc;
color: #666666; */
background: #F5F5F5;
font-weight: 400;
font-size: 25rpx;
color: #999999;
}
.date-time.active {
border-color: #0B898E;
@ -93,4 +116,9 @@
right: 0;
bottom: 0;
padding-bottom: 50rpx;
}
.short-date {
font-weight: 500;
font-size: 27rpx;
color: #000000;
}

51
pages/order/scene/index.js

@ -36,14 +36,19 @@ Page({
is_authentication:1, // 是否实名,0否1是,默认实名
phone:'', //不实名时传的手机号
is_real_name:1, // 是否是一证一票,0否1是,
status:false
status:false,
date: "",
time: "",
ydxz:false, //预定须知弹框
bookingInfo: null,
bookingInfoTitle: "",
showDate:false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
product: app.globalData.product,
type: options.type,
@ -57,7 +62,11 @@ Page({
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
})
console.log('-------',this.data.date,this.data.time);
// 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);
@ -92,6 +101,34 @@ Page({
// 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);
@ -255,9 +292,11 @@ Page({
}
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
singlePrice: this.data.gp_id ? this.data.product.sku.event_price : e.detail.price,
showDate:true
})
// this.changePrice()
},
@ -290,6 +329,12 @@ Page({
})
},
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 = [];

6
pages/order/scene/index.json

@ -1,8 +1,10 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"date":"../components/date/index",
"date1":"../components/date/index",
"contact":"../components/contact/index",
"coupon":"../components/coupon/index"
"coupon":"../components/coupon/index",
"notice":"/pages/component/notice/notice",
"date":"/pages/order/components/date"
}
}

66
pages/order/scene/index.wxml

@ -1,12 +1,31 @@
<!--pages/order/scene/index.wxml-->
<view class="{{product && product.isGroup==1?'group-order':''}}">
<title title="订单填写"></title>
<view class="product-info" wx:if="{{product}}">
<!-- <view class="product-info" wx:if="{{product}}">
<view class="product-title">{{product.product.title + product.isGroup==1?'(团体预约)':product.sku.sku_name}}</view>
<view class="product-price" wx:if="{{type=='museum' || type=='activity'}}">免费</view>
</view> -->
<!-- <date wx:if="{{isLogin && type!='activity' && ticket_type == 1}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
product="{{product}}"></date> -->
<!-- 出行日期 信息展示部分 -->
<view class="box" style="padding: 42rpx 21rpx 45rpx 19rpx;display: flex;justify-content: space-between;align-items: center;">
<view>
<view style="font-weight: 500;font-size: 36rpx;color: #000000;margin-bottom: 39rpx;">
{{product.product.title}}
</view>
<view style="font-weight: 400;font-size: 25rpx;color: #666666;padding-left: 2rpx;">
<view style="margin-bottom: 20rpx;">
{{date.date}} {{date.week}}
</view>
<view wx:if="{{time.start_time && time.end_time}}">
{{time.start_time}}-{{time.end_time}} 入园
</view>
</view>
</view>
<view class="change-date" bindtap="changeDate">
修改 >
</view>
</view>
<date wx:if="{{isLogin && type!='activity' && ticket_type == 1}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
product="{{product}}"></date>
<view class="box" wx:if="{{product && product.isGroup==1}}">
<view class="box-title">
<view style="flex-shrink:0">团体主体名称:</view>
@ -15,11 +34,27 @@
</view>
<view class="box">
<view class="box-title">
<view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view>
<view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></view>
<view style="flex:1">{{product && product.isGroup!=1?product.sku.sku_name:'预约人数'}}</view>
<!-- <view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view> -->
<!-- <view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></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>
<view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></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">预订须知 ></text>
</view>
<!-- <view class="text2">
<text wx:for="{{product.sku.display_tags}}" style="margin-right: 15rpx;">{{item}}</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>
<!-- 补贴 -->
@ -93,4 +128,23 @@
</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 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>

133
pages/order/scene/index.wxss

@ -64,14 +64,14 @@ page {
display: flex;
align-items: center;
padding: 31rpx 21rpx;
border-top: 1rpx solid #ccc;
/* border-top: 1rpx solid #ccc; */
}
.date-item {
width: 162rpx;
height: 97rpx;
width: 120rpx;
height: 133rpx;
border-radius: 10rpx;
border: 1rpx solid #333;
/* border: 1rpx solid #333; */
text-align: center;
font-size: 27rpx;
color: #000;
@ -80,6 +80,8 @@ page {
justify-content: center;
align-items: center;
flex-direction: column;
background: #F5F5F5;
flex-shrink: 0;
}
.date-item.active {
@ -90,7 +92,7 @@ page {
.date-item.disable {
border-color: #CCCCCC;
color: #666;
color: #999;
}
.date-item .price {
@ -101,14 +103,29 @@ page {
.date-item.active .price {
color: #fff;
}
.date-item.active view {
color: #fff;
}
.date-item.disable .price {
color: #666;
color: #999;
}
.date-item.disable .short-date {
color: #999;
}
.more-item {
width: 99rpx;
margin-right: 0;
/* 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 {
@ -118,25 +135,35 @@ page {
margin: 0 21rpx;
padding-top: 34rpx;
padding-bottom: 10rpx;
border-top: 1rpx dashed #ccc;
/* border-top: 1rpx dashed #ccc; */
flex-wrap: wrap;
}
.date-time {
width: 315rpx;
line-height: 58rpx;
border: 1px solid #333;
/* 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;
/* 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 {
@ -155,9 +182,9 @@ page {
font-weight: 500;
color: #000;
flex-shrink: 0;
width: 67rpx;
/* width: 67rpx; */
line-height: 49rpx;
background: #F0F0F0;
/* background: #F0F0F0; */
border-radius: 7rpx;
text-align: center;
margin: 0 20rpx;
@ -340,4 +367,82 @@ page {
/* 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;
}
.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;
}
.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;
}
Loading…
Cancel
Save