diff --git a/app.js b/app.js index 9f3fb65..099f6be 100644 --- a/app.js +++ b/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(() => { diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index 0bedfef..087b0bb 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/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) { - this.setData({ - showDate: true, - }) - this.setData({ - product: product, - showDate2: true, - skuFlag: 'order', - showPrice:e.currentTarget.dataset.sku.price - }) + 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, + product: product, + showDate2: true, + skuFlag: 'order', + 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 + }) + }, /** * 生命周期函数--监听页面初次渲染完成 diff --git a/pages/info/sceneProductInfo/index.wxml b/pages/info/sceneProductInfo/index.wxml index 40c9023..bbe5b07 100644 --- a/pages/info/sceneProductInfo/index.wxml +++ b/pages/info/sceneProductInfo/index.wxml @@ -13,22 +13,40 @@ {{info.title}} - {{item}} - + {{item}} - - {{isBook?"活动":"开园"}}时间:{{info.open_time}} - 优待政策 | 景点介绍 + + + + {{isBook?"活动":"开园"}}时间 + {{info.open_time}} + + + + 详情 + - - 地址:{{info.address}} - + + + 地址 + {{info.address}} + + + + 导航 + + {{info.garden_flag_text}} + + 预订 + 评价/问答 + 详情/政策 + - + @@ -56,13 +74,13 @@ {{sku.display_tags_str}} - 预订须知>> + ⓘ预订须知> {{sku.price?sku.price/100:0}} - + - + + + + 预订须知 + + 预订须知 + 产品详情 + + + + + + 合计: {{showPrice/100}} @@ -185,39 +218,8 @@ 去提问 --> - - - - - 问大家 - - - 这里空空如也,快去向大家提问吧! - 去提问 - - - - - - - {{item.question_name}} - {{item.answer.total}}个回答 - 暂无回答 - - - - - - - 查看全部问答 - - - + + 游客点评{{info.rate}}分 共{{commentTotal}}条 > @@ -252,7 +254,54 @@ 查看全部点评 - + + + 问大家 + + + 这里空空如也,快去向大家提问吧! + 去提问 + + + + + + + {{item.question_name}} + {{item.answer.total}}个回答 + 暂无回答 + + + + + + + 查看全部问答 + + + + + + + 景点介绍 + 开放时间 + 优待政策 + + + {{menuType==0?"景点介绍":menuType==1?"开放时间":"优待政策"}} + + + + + + + + diff --git a/pages/info/sceneProductInfo/index.wxss b/pages/info/sceneProductInfo/index.wxss index 111d23f..24e6be0 100644 --- a/pages/info/sceneProductInfo/index.wxss +++ b/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; -} - -.tags-text { - flex: 1; - text-align: right; -} +.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-box .iconfont { - margin-left: 4rpx; - font-size: 24rpx; } - -.address-box { - justify-content: space-between; - margin-top: 0; +.address-text{ + flex: 1; + width: 1rpx; + padding-right: 26rpx; + display: flex; + flex-direction: column; + justify-content: space-between; } - .info-address { - color: #666; - font-size: 27rpx; - margin-bottom: 0rpx; - line-height: 40rpx; + font-weight: bold; + font-size: 27rpx; + color: #000000; } - -.address-box .iconfont { - font-size: 34rpx; +.sub-info-address{ + font-weight: 500; + font-size: 24rpx; + color: #666666; +} +.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; +} +.address-box .iconfont image{ + width: 33rpx; + height: 33rpx; +} +.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; @@ -958,4 +972,64 @@ page { background: #FFF; 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; } \ No newline at end of file diff --git a/pages/list/scene/index.wxml b/pages/list/scene/index.wxml index 18b337e..d54e890 100644 --- a/pages/list/scene/index.wxml +++ b/pages/list/scene/index.wxml @@ -21,18 +21,18 @@ {{item.title}} - + {{item}} - + {{item.distance}} - - {{item.address}} + + {{item.address}} - {{item.price?item.price/100:0}} + diff --git a/pages/list/scene/index.wxss b/pages/list/scene/index.wxss index d645bf1..162a594 100644 --- a/pages/list/scene/index.wxss +++ b/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{ diff --git a/pages/order/components/date/index.js b/pages/order/components/date/index.js index 24ad21b..423c986 100644 --- a/pages/order/components/date/index.js +++ b/pages/order/components/date/index.js @@ -24,7 +24,11 @@ Component({ endDays: { type: Number, value: 60 - } + }, + datePrice: { + type: Array, + value: [] + }, }, /** @@ -65,99 +69,23 @@ 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) { // 获取价格日历 - commonApi.user_post("product/product_date_price", { - start_date: today, - end_date: end_date, - sku_id: product.sku.id - }).then(res => { - 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)){ - // 如果是团队预约的场馆 并且是今天的话 不能预定 - res.data[i].stock=0; - // res.data.price=100; - res.data[i].tipText = '不可定' - } - } - // 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了 - if (app.globalData.product.infoDate) { - let dateIndex = res.data.slice(0, 3).findIndex(item => item.date == app.globalData.product.infoDate.date) - // if(!app.globalData.product.infoDate.short_date){ - // app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-") - // } - this.setData({ - activeDate: app.globalData.product.infoDate, - moreFlag: dateIndex != -1 - }) - this.getTimeStock() - this.triggerEvent("onChangeDate", app.globalData.product.infoDate) - } - else { - for (let i = 0; i < res.data.length; i++) { - if (res.data[i].stock > 0) { - res.data[i].short_date = res.data[i].date.split("-").splice(1, 2).join("-") - this.setData({ - activeDate: res.data[i] - }) - this.getTimeStock() - this.triggerEvent("onChangeDate", this.data.activeDate) - break; - } - } - } - if (this.data.gpIdCom) { - // 拼团的话 价格日历无效 所有价格都是sku里面的event_price - res.data.map(item => { - item.price = product.sku.event_price + 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}) }) - } - - 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 = '' - let leftIndex = 0; - if (app.globalData.product.changeFlag) { - if( app.globalData.product.date) { - - res.data.forEach((item,index)=> { - if (item.date == app.globalData.product.date.date) { - seldDate = item - leftIndex = index - } - }) - } - - this.setData({ - scrollLeft: 70*leftIndex - }) - setTimeout(() => { - this.changeDate(seldDate) - }) - // this.setData({ - // activeDate:seldDate - // }) - // this.getTimeStock() - } - this.setData({ - threeDays: res.data.slice(0, 3), - monthList: res.data, - // 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 - }) - }) + } + } }) @@ -178,6 +106,94 @@ Component({ * 组件的方法列表 */ 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)){ + // 如果是团队预约的场馆 并且是今天的话 不能预定 + res.data[i].stock=0; + // res.data.price=100; + res.data[i].tipText = '不可定' + } + } + // 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了 + if (app.globalData.product.infoDate) { + let dateIndex = res.data.slice(0, 3).findIndex(item => item.date == app.globalData.product.infoDate.date) + // if(!app.globalData.product.infoDate.short_date){ + // app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-") + // } + this.setData({ + activeDate: app.globalData.product.infoDate, + moreFlag: dateIndex != -1 + }) + this.getTimeStock() + this.triggerEvent("onChangeDate", app.globalData.product.infoDate) + } + else { + for (let i = 0; i < res.data.length; i++) { + if (res.data[i].stock > 0) { + res.data[i].short_date = res.data[i].date.split("-").splice(1, 2).join("-") + this.setData({ + activeDate: res.data[i] + }) + this.getTimeStock() + this.triggerEvent("onChangeDate", this.data.activeDate) + break; + } + } + } + if (this.data.gpIdCom) { + // 拼团的话 价格日历无效 所有价格都是sku里面的event_price + res.data.map(item => { + item.price = product.sku.event_price + }) + } + + 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 = '' + let leftIndex = 0; + if (app.globalData.product.changeFlag) { + if( app.globalData.product.date) { + + res.data.forEach((item,index)=> { + if (item.date == app.globalData.product.date.date) { + seldDate = item + leftIndex = index + } + }) + } + + this.setData({ + scrollLeft: 70*leftIndex + }) + setTimeout(() => { + this.changeDate(seldDate) + }) + // this.setData({ + // activeDate:seldDate + // }) + // this.getTimeStock() + } + this.setData({ + threeDays: res.data.slice(0, 3), + monthList: res.data, + // 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 + }) + }, + getDay: function (date) { let d = new Date(date.replace(/-/g, '/')).getDay(); let days = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];