Browse Source

景点

master
jiazhipeng 8 months ago
parent
commit
033073b8f7
  1. 2
      app.js
  2. 49
      pages/info/sceneProductInfo/index.js
  3. 139
      pages/info/sceneProductInfo/index.wxml
  4. 166
      pages/info/sceneProductInfo/index.wxss
  5. 10
      pages/list/scene/index.wxml
  6. 11
      pages/list/scene/index.wxss
  7. 62
      pages/order/components/date/index.js

2
app.js

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

49
pages/info/sceneProductInfo/index.js

@ -51,6 +51,12 @@ Page({
ZTPoint:'',
sku_id: null,
showTabIndex: 0,
menuType: 0,
orderSku: null, // 预订的sku
orderProduct: null,
noticeIndex: 0,
skuPriceDate: [],
},
@ -821,15 +827,28 @@ Page({
console.log(app.globalData.product);
console.log(ticket_type);
if (ticket_type != 2) {
let today = util.formatDate(new Date()),
end_date = util.formatDate(new Date(new Date().getTime() + 30 * 24 * 60 * 60 * 1000));
commonApi.user_post("product/product_date_price", {
start_date: today,
end_date: end_date,
sku_id: sku.sku.id
}).then(res => {
if (res && res.code == 1) {
this.setData({
showDate: true,
})
this.setData({
product: product,
showDate2: true,
skuFlag: 'order',
showPrice:e.currentTarget.dataset.sku.price
showPrice:e.currentTarget.dataset.sku.price,
orderSku: e.currentTarget.dataset.sku,
orderProduct: e.currentTarget.dataset.product,
noticeIndex: 0,
skuPriceDate: res.data
})
}
})
}else {
let skuIndex = this.data.skuList.findIndex(v=>v.id == sku.sku.id)
@ -985,6 +1004,30 @@ Page({
}
},
changeTabIndex: function (e) {
let value = e.currentTarget.dataset.value
this.setData({
showTabIndex:value
})
},
changeMenu: function (e) {
let value = e.currentTarget.dataset.index
this.setData({
menuType:value
})
},
viewOPenTime: function (e) {
this.setData({
showTabIndex:2,
menuType: 1
})
},
changeNoticeIndex: function (e) {
let value = e.currentTarget.dataset.index
this.setData({
noticeIndex:value
})
},
/**
* 生命周期函数--监听页面初次渲染完成

139
pages/info/sceneProductInfo/index.wxml

@ -13,22 +13,40 @@
<view class="top-info" wx:if="{{info}}" style="position:relative">
<view class="title">{{info.title}}</view>
<view class="tags-box textOver">
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}<view class="line"></view>
<view class="tag textOver" wx:for="{{info.display_tags}}">{{item}}</view>
</view>
<view class="address-box" bind:tap="viewOPenTime">
<view class="address-text">
<view class="info-address">{{isBook?"活动":"开园"}}时间</view>
<view class="sub-info-address textOver">{{info.open_time}}</view>
</view>
<view class="iconfont">
<image src="https://static.ticket.sz-trip.com/uploads/20250808/b64e49752fc3e0831db700331db766dd.png"></image>
<view>详情</view>
</view>
</view>
<view class="tags-box address-box" style="height:auto">
<view class="info-address">{{isBook?"活动":"开园"}}时间:{{info.open_time}}</view>
<navigator wx:if="{{!isBook}}" url="/pages/info/sceneInfo/index?id={{info.id}}" catchtap="pagePoint" data-event="scene_detail" class="iconfont" style="font-size:27rpx;flex-shrink:0">优待政策 | 景点介绍 <text class="iconfont icon-you" style="font-size:24rpx"></text></navigator>
<view class="address-box true-address" bindtap="gotolocation">
<view class="address-text">
<view class="info-address">地址</view>
<view class="sub-info-address textOver">{{info.address}}</view>
</view>
<view class="tags-box textOver address-box" bindtap="gotolocation">
<view class="info-address">地址:{{info.address}}</view>
<view class="iconfont icon-daohang"></view>
<view class="iconfont">
<image src="https://static.ticket.sz-trip.com/uploads/20250808/0faddf87d40d7bd782a6aab047f2046e.png"></image>
<view>导航</view>
</view>
</view>
<view class="status-text{{info.garden_flag==0?' disable':''}}" wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
</view>
<view class="tab-info-container" wx:if="{{info}}">
<view class="tab-item {{showTabIndex==0?'active':''}}" bind:tap="changeTabIndex" data-value="0">预订</view>
<view class="tab-item {{showTabIndex==1?'active':''}}" bind:tap="changeTabIndex" data-value="1">评价/问答</view>
<view class="tab-item {{showTabIndex==2?'active':''}}" bind:tap="changeTabIndex" data-value="2">详情/政策</view>
</view>
<view class="sku-type-container" wx:if="{{info}}">
<view class="sku-type-container" wx:if="{{info&&showTabIndex==0}}">
<view class="left-type-container">
<view class="sku-type {{activeIndex==index?'active':''}}" wx:for="{{info.product}}"
data-index="{{index}}" bindtap="changeMenu">
@ -56,13 +74,13 @@
<view class="product-tag textOver" >{{sku.display_tags_str}}</view>
</view>
<view class="order-tip-text" bindtap="showBookingInfo" data-item="{{sku}}">预订须知>></view>
<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 wx:if="{{sku.is_merged}}">起</text>
<!-- <text wx:if="{{sku.is_merged}}">起</text> -->
</view>
<!-- showOrder selectDate -->
<view bindtap="selectDate" data-sku="{{sku}}" data-product="{{item}}"
@ -135,7 +153,22 @@
<view class="mask-bg" bindtap="hideDate"></view>
<view class="mask-content1">
<view class="iconfont icon-close" bindtap="hideDate"></view>
<date wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}" endDays="{{30}}"></date>
<date wx:if="{{showDate2}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime"
product="{{product}}" datePrice="{{skuPriceDate}}" endDays="{{30}}"></date>
<view class="orderNotice" wx:if="{{orderSku}}">
<view style="font-weight: 500;font-size: 15px;color: #000000;">预订须知</view>
<view class="scroll-menus" wx:if="{{orderProduct&&orderProduct.content}}">
<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.content)}}"></rich-text>
</view>
<view style="height: 180rpx;"></view>
<view class="bottom-box">
<view>
合计: <text class="totalPrice">{{showPrice/100}}</text>
@ -185,39 +218,8 @@
<view class="empty-btn">去提问</view>
</view> -->
<view class="box box-gb-20241216" wx:if="{{isTest==false}}">
<view class="box-top" style="border-bottom:1px solid #D9D9D9;">
<text class="iconfont icon-tiwen1"></text><text>问大家</text>
</view>
<view class="empty-box" wx:if="{{!ask || ask.length==0}}">
<view>这里空空如也,快去向大家提问吧!</view>
<navigator url="/pages/ask/index?id={{id}}" catchtap="pagePoint" data-event="scene_question" class="empty-btn">去提问
</navigator>
</view>
<view class="ask-list" wx:else>
<navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment" class="ask-item" wx:for="{{ask}}">
<view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ask.png" mode="widthFix"></image>
<view class="ques">{{item.question_name}}</view>
<view class="ques-num" wx:if="{{item.answer.total!=0}}">{{item.answer.total}}个回答</view>
<view class="ques-num" wx:if="{{item.answer.total==0}}">暂无回答</view>
</view>
<!-- <view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ans.png" mode="widthFix"></image>
<view class="ans">{{item.answer && item.answer.lastest_answer?item.answer.lastest_answer.answer:"暂无回答"}}</view>
</view>
<view class="ques-tip">
<view class="ques-time">{{item.created_time}}提问</view> -->
<!-- <view class="ans-number">全部{{item.answer && item.answer.total ? item.answer.total : 0}}个回答 <text class="iconfont icon-you"></text> </view> -->
<!-- </view> -->
</navigator>
<navigator style="border-top:1rpx solid #ccc" url="/pages/ask/index?id={{info.id}}" class="more-comment-btn">
查看全部问答<text class="iconfont icon-you"></text></navigator>
</view>
</view>
<view class="box box-gb-20241216">
<view wx:if="{{showTabIndex==1}}">
<view class="box box-gb-20241216" style="margin: 0;">
<view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text>
<navigator url="/pages/list/comments/index?sceneid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
@ -252,7 +254,54 @@
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator>
</view>
<view style="height:140rpx"></view>
<view class="box box-gb-20241216">
<view class="box-top" style="border-bottom:1px solid #D9D9D9;">
<text class="iconfont icon-tiwen1"></text><text>问大家</text>
</view>
<view class="empty-box" wx:if="{{!ask || ask.length==0}}">
<view>这里空空如也,快去向大家提问吧!</view>
<navigator url="/pages/ask/index?id={{id}}" catchtap="pagePoint" data-event="scene_question" class="empty-btn">去提问
</navigator>
</view>
<view class="ask-list" wx:else>
<navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment" class="ask-item" wx:for="{{ask}}">
<view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ask.png" mode="widthFix"></image>
<view class="ques">{{item.question_name}}</view>
<view class="ques-num" wx:if="{{item.answer.total!=0}}">{{item.answer.total}}个回答</view>
<view class="ques-num" wx:if="{{item.answer.total==0}}">暂无回答</view>
</view>
<!-- <view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ans.png" mode="widthFix"></image>
<view class="ans">{{item.answer && item.answer.lastest_answer?item.answer.lastest_answer.answer:"暂无回答"}}</view>
</view>
<view class="ques-tip">
<view class="ques-time">{{item.created_time}}提问</view> -->
<!-- <view class="ans-number">全部{{item.answer && item.answer.total ? item.answer.total : 0}}个回答 <text class="iconfont icon-you"></text> </view> -->
<!-- </view> -->
</navigator>
<navigator style="border-top:1rpx solid #ccc" url="/pages/ask/index?id={{info.id}}" class="more-comment-btn">
查看全部问答<text class="iconfont icon-you"></text></navigator>
</view>
</view>
</view>
<view style="background:white" wx:if="{{showTabIndex==2}}">
<view class="scroll-menus">
<view class="scroll-menu-item{{menuType==0?' active':''}}" bindtap="changeMenu" data-index="0">景点介绍</view>
<view class="scroll-menu-item{{menuType==1?' active':''}}" bindtap="changeMenu" data-index="1">开放时间</view>
<view class="scroll-menu-item{{menuType==2?' active':''}}" bindtap="changeMenu" data-index="2">优待政策</view>
</view>
<view class="scroll-content" style="padding: 20rpx 33rpx;">
<view class="info-title">{{menuType==0?"景点介绍":menuType==1?"开放时间":"优待政策"}}</view>
<rich-text wx:if="{{menuType==0}}" class="detail" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
<rich-text wx:if="{{menuType==1}}" class="detail" nodes="{{tool.formateRichText(info.time_info)}}"></rich-text>
<rich-text wx:if="{{menuType==2}}" class="detail" nodes="{{tool.formateRichText(info.extra_info)}}"></rich-text>
</view>
</view>
<view style="height:160rpx"></view>
<notice bookingInfo="{{bookingInfo}}" skuName="{{bookingInfoTitle}}" wx:if="{{bookingInfo}}" bind:close="closeMask">
</notice>
<view style="position:absolute;right:0;left:-10000rpx;top:-20000rpx;z-index:-1">

166
pages/info/sceneProductInfo/index.wxss

@ -24,8 +24,8 @@ page {
}
.top-info .title {
font-size: 32rpx;
font-weight: 500;
font-size: 37rpx;
font-weight: bold;
color: #000;
}
@ -41,50 +41,61 @@ page {
.tags-box .tag {
position: relative;
line-height: 20rpx;
font-size: 20rpx;
font-weight: 500;
line-height: 50rpx;
font-weight: bold;
font-size: 21rpx;
color: #0B898E;
margin-right: 10rpx;
padding: 6rpx 7rpx;
border-radius: 10rpx;
border: 1px solid #0B898E;
}
.tags-box .tag .line {
content: "1";
display: block;
font-size: 0;
position: absolute;
left: 0;
right: 0;
background: #DAF3E9;
height: 8rpx;
top: 30rpx;
z-index: -1;
}
.address-box {
display: flex;
margin-top: 20rpx;
height: 100rpx;
background: rgba(11, 137, 142, 0.06);
border-radius: 13rpx;
padding: 15rpx 13rpx;
box-sizing: border-box;
.tags-text {
}
.address-text{
flex: 1;
text-align: right;
width: 1rpx;
padding-right: 26rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.tags-box .iconfont {
margin-left: 4rpx;
.info-address {
font-weight: bold;
font-size: 27rpx;
color: #000000;
}
.sub-info-address{
font-weight: 500;
font-size: 24rpx;
color: #666666;
}
.address-box {
.address-box .iconfont{
font-weight: 500;
font-size: 24rpx;
color: #0B898E;
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
margin-top: 0;
}
.info-address {
color: #666;
font-size: 27rpx;
margin-bottom: 0rpx;
line-height: 40rpx;
.address-box .iconfont image{
width: 33rpx;
height: 33rpx;
}
.address-box .iconfont {
font-size: 34rpx;
.address-box.true-address{
background-image: url("https://static.ticket.sz-trip.com/uploads/20250808/2f37b2d618091c22ed5d6a330fd742e4.png");
background-size: 100% 100%;
background-repeat: no-repeat;
}
.box {
@ -154,13 +165,17 @@ page {
}
.order-tip-text {
/* margin-top: 33rpx;
font-size: 24rpx;
color: #666; */
font-weight: 400;
font-size: 23rpx;
color: #0B898E;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
margin-top: 18rpx;
width: 152rpx;
height: 40rpx;
border-radius: 4rpx;
background: #0B898E;
text-align: center;
line-height: 40rpx;
}
.product-right {
@ -198,7 +213,7 @@ page {
width: 176rpx; */
width: 93rpx;
height: 80rpx;
background: #0B898E;
background: #D62828;
border-radius: 13rpx;
font-weight: 500;
font-size: 31rpx;
@ -299,7 +314,6 @@ page {
color: #999;
font-size: 27rpx;
font-weight: 500;
margin-bottom:60rpx ;
}
.more-comment-btn .iconfont {
@ -888,7 +902,7 @@ page {
display: flex;
justify-content: space-between;
align-items: center;
position: absolute;
position: fixed;
left: 0;
right: 0;
bottom: 0;
@ -914,7 +928,7 @@ page {
background: white;
border-radius: 12rpx;
overflow-y: auto;
height: 1100rpx;
height: 85vh;
}
.icon-close {
position: absolute;
@ -925,7 +939,7 @@ page {
.sku-type-container{
display: flex;
margin-top: 20rpx;
}
.left-type-container{
width: 147rpx;
@ -959,3 +973,63 @@ page {
margin: 20rpx 0;
padding:0 20rpx;
}
.tab-info-container{
height: 100%;
height: 93rpx;
background: #ECF4F4;
border-radius: 13rpx 13rpx 0rpx 0rpx;
display: flex;
margin-top: 20rpx;
}
.tab-info-container .tab-item{
flex: 1;
flex-shrink: 0;
height: 93rpx;
/* background: #FFFFFF; */
border-radius: 13rpx 13rpx 0rpx 0rpx;
font-weight: 500;
font-size: 31rpx;
color: #000000;
text-align: center;
line-height: 93rpx;
}
.tab-info-container .tab-item.active{
font-weight: bold;
font-size: 31rpx;
color: #0B898E;
background: #FFFFFF;
}
.scroll-menus{
padding: 26rpx 33rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.scroll-menus .scroll-menu-item{
width: 200rpx;
height: 53rpx;
border-radius: 27rpx;
border: 1px solid #999999;
line-height: 53rpx;
font-weight: bold;
font-size: 28rpx;
color: #666666;
text-align: center;
}
.scroll-menus .scroll-menu-item.active{
border: 1px solid #0B898E;
color: #0B898E;
}
.info-title {
font-size: 35rpx;
font-weight: bold;
color: #000;
margin-bottom: 30rpx;
}
.orderNotice{
padding: 0 25rpx 0 35rpx;
}

10
pages/list/scene/index.wxml

@ -21,18 +21,18 @@
<!-- <view class="status-text" wx:if="{{item.garden_flag_text && item.garden_flag!=1}}">{{item.garden_flag_text}}</view> -->
<view class="right-info">
<view class="title textOver2">{{item.title}}</view>
<view class="tags">
<view class="tags" style="width: 100%;">
<view class="tag" wx:for="{{item.tags}}">{{item}}</view>
</view>
<!-- <view class="location textOver" style="width:432rpx"><text class="iconfont icon-location"></text>{{item.address}}</view> -->
<view class="price-box">
<view style="width: 280rpx;display: flex;align-items: center;font-weight: 400;font-size: 24rpx;color: #999999;" class="textOver">
<view style="display: flex;align-items: center;font-weight: 400;font-size: 24rpx;color: #999999;" class="textOver">
<text wx:if="{{item.distance}}">{{item.distance}}</text>
<text wx:else></text>
<view style="width: 1rpx;height: 21rpx;background: #999999;flex-shrink: 0;margin: 0 12rpx;"></view>
<view class="location">{{item.address}}</view>
<view wx:if="{{item.distance}}" style="width: 1rpx;height: 21rpx;background: #999999;flex-shrink: 0;margin: 0 12rpx;"></view>
<view class="location textOver">{{item.address}}</view>
</view>
<view class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view>
<!-- <view class="price"><text>¥</text><text>{{item.price?item.price/100:0}}</text><text>起</text></view> -->
</view>
</view>
</view>

11
pages/list/scene/index.wxss

@ -72,9 +72,7 @@
}
.tags {
display: flex;
margin-top: 16rpx;
align-items: center;
margin-bottom: 30rpx;
width: 430rpx;
}
.tag {
@ -179,7 +177,14 @@
}
.right-info {
padding: 10.67rpx 0 7.33rpx;
height: 186rpx;
padding: 0;
flex:1;
width: 100rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-around;
}
.title-box,.title-header{

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

@ -24,7 +24,11 @@ Component({
endDays: {
type: Number,
value: 60
}
},
datePrice: {
type: Array,
value: []
},
},
/**
@ -65,17 +69,48 @@ Component({
isSzMuseum: true
})
}
let todayTimes = new Date(today.replace(/-/g,'/')).getTime()
let todayTimes = new Date(today.replace(/-/g,'/')).getTime();
commonApi.user_post("token/check").then(res => {
if (res&&res.code == 1) {
// 获取价格日历
if (Array.isArray(this.properties.datePrice) && this.properties.datePrice.length>0) {
let param = {code: 1, data: this.properties.datePrice}
this.handleDatePrice(param, {todayTimes})
} else {
commonApi.user_post("product/product_date_price", {
start_date: today,
end_date: end_date,
sku_id: product.sku.id
}).then(res => {
this.handleDatePrice(res, {todayTimes})
})
}
}
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
pageLifetimes: {
show: function () {
this.setData({
kjIdCom: app.globalData.kjId,
gpIdCom: app.globalData.gp_id || app.globalData.team_id
})
}
},
/**
* 组件的方法列表
*/
methods: {
handleDatePrice:function (res, otherParam) {
let {todayTimes} = otherParam
for (let i = 0; i < res.data.length; i++) {
if(new Date(res.data[i].date.replace(/-/g,'/')).getTime()==todayTimes && (this.properties.isTeam || this.properties.product && this.properties.product.isTeam==1)){
if(new Date(res.data[i].date.replace(/-/g,'/')).getTime()==todayTimes &&
(this.properties.isTeam || this.properties.product && this.properties.product.isTeam==1)){
// 如果是团队预约的场馆 并且是今天的话 不能预定
res.data[i].stock=0;
// res.data.price=100;
@ -157,27 +192,8 @@ Component({
this.setData({
moreFlag: index != -1
})
})
}
})
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
},
},
pageLifetimes: {
show: function () {
this.setData({
kjIdCom: app.globalData.kjId,
gpIdCom: app.globalData.gp_id || app.globalData.team_id
})
}
},
/**
* 组件的方法列表
*/
methods: {
getDay: function (date) {
let d = new Date(date.replace(/-/g, '/')).getDay();
let days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];

Loading…
Cancel
Save