Browse Source

景点调整

master
jiazhipeng 8 months ago
parent
commit
55a676c2dc
  1. 2
      app.js
  2. 48
      pages/info/sceneProductInfo/index.js
  3. 45
      pages/info/sceneProductInfo/index.wxml
  4. 48
      pages/info/sceneProductInfo/index.wxss

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest115? true : false; data.isTest = data.isTest114? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

48
pages/info/sceneProductInfo/index.js

@ -58,6 +58,8 @@ Page({
noticeIndex: 0, noticeIndex: 0,
skuPriceDate: [], skuPriceDate: [],
skuShowIndex: 0,
skuShowDomId: "",
}, },
/** /**
@ -327,17 +329,17 @@ Page({
}) })
}, },
showBookingInfo: function (e) { showBookingInfo: function (e) {
this.setData({ // this.setData({
bookingInfo: e.currentTarget.dataset.item.sku_model, // bookingInfo: e.currentTarget.dataset.item.sku_model,
bookingInfoTitle: e.currentTarget.dataset.item.sku_name // bookingInfoTitle: e.currentTarget.dataset.item.sku_name
}) // })
util.pagePoint({ // util.pagePoint({
event: "scene_notice", // event: "scene_notice",
param: { // param: {
type: this.data.info.type, // type: this.data.info.type,
id: this.data.info.id // id: this.data.info.id
} // }
}, 1) // }, 1)
}, },
closeMask: function () { closeMask: function () {
this.setData({ this.setData({
@ -826,6 +828,9 @@ Page({
} }
console.log(app.globalData.product); console.log(app.globalData.product);
console.log(ticket_type); console.log(ticket_type);
let showSkuIndex = e.currentTarget.dataset.index || 0
if (ticket_type != 2) { if (ticket_type != 2) {
let today = util.formatDate(new Date()), let today = util.formatDate(new Date()),
end_date = util.formatDate(new Date(new Date().getTime() + 30 * 24 * 60 * 60 * 1000)); end_date = util.formatDate(new Date(new Date().getTime() + 30 * 24 * 60 * 60 * 1000));
@ -844,7 +849,9 @@ Page({
orderSku: e.currentTarget.dataset.sku, orderSku: e.currentTarget.dataset.sku,
orderProduct: e.currentTarget.dataset.product, orderProduct: e.currentTarget.dataset.product,
noticeIndex: 0, noticeIndex: 0,
skuPriceDate: res.data skuPriceDate: res.data,
skuShowIndex:showSkuIndex,
skuShowDomId:"sku-show-"+showSkuIndex,
}) })
} }
}) })
@ -1028,6 +1035,23 @@ Page({
}) })
}, },
changeSimpleVal (e) {
let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val;
let param = {}
param[keyname] = val
if (keyname == "skuShowIndex") {
param.skuShowDomId = "sku-show-0"
if (val == 1) {
param.skuShowDomId = "sku-show-1"
}
}
this.setData(param)
console.log(this.data)
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

45
pages/info/sceneProductInfo/index.wxml

@ -74,7 +74,9 @@
<view class="product-tag textOver" >{{sku.display_tags_str}}</view> <view class="product-tag textOver" >{{sku.display_tags_str}}</view>
</view> </view>
<view class="order-tip-text" bindtap="showBookingInfo" data-item="{{sku}}">ⓘ预订须知></view> <view class="order-tip-text" bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}"
data-index="1"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}">ⓘ预订须知></view>
</view> </view>
<view class="product-right"> <view class="product-right">
<view class="price"> <view class="price">
@ -84,7 +86,7 @@
</view> </view>
<!-- showOrder selectDate --> <!-- showOrder selectDate -->
<view bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}" <view bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}"
data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" data-index="0"
class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">预订</view> class="btn{{item.flag==0 || sku.flag=='off'?' disable':''}}">预订</view>
</view> </view>
</view> </view>
@ -152,23 +154,30 @@
<view class="mask" wx:if="{{showDate}}"> <view class="mask" wx:if="{{showDate}}">
<view class="mask-bg" bindtap="hideDate"></view> <view class="mask-bg" bindtap="hideDate"></view>
<view class="mask-content1"> <view class="mask-content1">
<view class="iconfont icon-close" bindtap="hideDate"></view> <view class="mask-top-menu">
<date wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" <view class="{{skuShowIndex==0?'active':''}}" bind:tap="changeSimpleVal" data-keyname="skuShowIndex" data-val="0">预订选择</view>
product="{{product}}" datePrice="{{skuPriceDate}}" endDays="{{30}}"></date> <view class="{{skuShowIndex==1?'active':''}}" bind:tap="changeSimpleVal" data-keyname="skuShowIndex" data-val="1">预订须知</view>
<view class="orderNotice" wx:if="{{orderSku}}">
<view style="font-weight: 500;font-size: 15px;color: #000000;margin-bottom: 26rpx;">预订须知</view>
<view class="scroll-menus" wx:if="{{orderProduct&&orderProduct.product_detail}}">
<view class="scroll-menu-item{{noticeIndex==0?' active':''}}"
bindtap="changeNoticeIndex" data-index="0" style="width: 276rpx;">预订须知</view>
<view class="scroll-menu-item{{noticeIndex==1?' active':''}}"
bindtap="changeNoticeIndex" data-index="1" style="width: 276rpx;">产品详情</view>
</view> </view>
<rich-text wx:if="{{noticeIndex==0}}" class="detail" nodes="{{tool.formateRichText(orderSku.sku_model.bookinfo)}}"></rich-text>
<rich-text wx:if="{{noticeIndex==1}}" class="detail" nodes="{{tool.formateRichText(orderProduct.product_detail)}}"></rich-text> <scroll-view class="mask-scroll-content" scroll-y scroll-into-view="{{skuShowDomId}}" scroll-with-animation>
<!-- <view class="iconfont icon-close" bindtap="hideDate"></view> -->
</view> <date id="sku-show-0" wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
<view style="height: 180rpx;"></view> product="{{product}}" datePrice="{{skuPriceDate}}" endDays="{{30}}"></date>
<view id="sku-show-1" class="orderNotice" wx:if="{{orderSku}}">
<view style="font-weight: 500;font-size: 15px;color: #000000;margin-bottom: 26rpx;">预订须知</view>
<view class="scroll-menus" wx:if="{{orderProduct&&orderProduct.product_detail}}">
<view class="scroll-menu-item{{noticeIndex==0?' active':''}}"
bindtap="changeNoticeIndex" data-index="0" style="width: 276rpx;">预订须知</view>
<view class="scroll-menu-item{{noticeIndex==1?' active':''}}"
bindtap="changeNoticeIndex" data-index="1" style="width: 276rpx;">产品详情</view>
</view>
<rich-text wx:if="{{noticeIndex==0}}" class="detail" nodes="{{tool.formateRichText(orderSku.sku_model.bookinfo)}}"></rich-text>
<rich-text wx:if="{{noticeIndex==1}}" class="detail" nodes="{{tool.formateRichText(orderProduct.product_detail)}}"></rich-text>
</view>
<view style="height: 180rpx;"></view>
</scroll-view>
<view class="bottom-box"> <view class="bottom-box">
<view> <view>
合计: <text class="totalPrice">{{showPrice/100}}</text> 合计: <text class="totalPrice">{{showPrice/100}}</text>

48
pages/info/sceneProductInfo/index.wxss

@ -926,9 +926,11 @@ line-height: 40rpx;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
background: white; background: white;
border-radius: 12rpx; /* border-radius: 12rpx; */
overflow-y: auto; overflow-y: auto;
height: 85vh; height: 85vh;
display: flex;
flex-direction: column;
} }
.icon-close { .icon-close {
position: absolute; position: absolute;
@ -1003,7 +1005,7 @@ line-height: 93rpx;
.scroll-menus{ .scroll-menus{
padding: 0rpx 33rpx 26rpx; padding: 26rpx 33rpx 26rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -1031,5 +1033,45 @@ line-height: 93rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
} }
.orderNotice{ .orderNotice{
padding: 0 25rpx 0 35rpx; padding: 20rpx 25rpx 0 35rpx;
}
.mask-top-menu{
width: 100%;
height: 84rpx;
background: #FFFFFF;
font-weight: 500;
font-size: 31rpx;
color: #000000;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #D8D8D8;
padding: 0 128rpx;
box-sizing: border-box;
flex-shrink: 0;
}
.mask-top-menu>view{
height: 84rpx;
line-height: 84rpx;
min-width: 121rpx;
}
.mask-top-menu>view.active{
color: #0B898E;
border-bottom: 4rpx solid #0B898E;
}
.mask-content1 .date-box .box-title{
font-weight: bold;
font-size: 37rpx;
color: #000000;
}
.mask-content1 .date-box>view:nth-of-type(2){
border: none !important;
padding-top: 10rpx !important;
height: auto !important;
}
.mask-scroll-content{
flex: 1;
height: 100rpx;
} }
Loading…
Cancel
Save