Commit 462c9b38 authored by 潘永坪's avatar 潘永坪

组合票优化,湖广会馆购票须知处理

parent dbfbb65d
......@@ -9,14 +9,14 @@
</view>
</u-swiper>
</view>
<view class="middle" id="middle">
<view class="middle" :style="middleStyle">
<!-- 中间上面部分 -->
<view class="middle-top" :style="middleTopStyle">
<view class="middle-top">
<view class="merchant-name">
{{currentMerchant.name||''}}
</view>
<u-transition :show="showTransition" :duration='600'>
<view class="merchant-info-bottom" id='info-bottom' >
<view class="merchant-info-bottom">
<view class="merchant-bottom-left">
<view>
<text style="color: #00B42B;">营业时间</text>
......@@ -48,7 +48,7 @@
</view>
<!-- 列表部分 -->
<view class="middle-bottom" :style="middleBottomStyle">
<view class="middle-bottom" id="middle-bottom">
<!-- 左边滚动条 -->
<scroll-view class="scroll-left" :style="{height:scrollHeight+'px'}" :scroll-into-view="toViewLeft" scroll-y>
<view class="middle-left">
......@@ -58,7 +58,7 @@
</view>
</scroll-view>
<!-- 右边滚动条 -->
<scroll-view @scroll="scrollRight" :style="{height:middleHeight+'px'}" :scroll-into-view="toViewRight" scroll-y>
<scroll-view class="scroll-right" @scroll="scrollRight" :style="{height:middleHeight+'px'}" :scroll-into-view="toViewRight" scroll-y>
<view class="middle-right">
<checkbox-group @change="checkboxChange" class="checkbox-box">
<view class="merchantlist-wrap" :id="'merchant'+index" v-for="(item, index) in scenicList" :key="index">
......@@ -139,7 +139,7 @@
</view>
<view class="bottom">
<view class="bottom" :style="bottomStyle">
<view class="bottom-left" @click="showCustomer()">
<u-icon name="chat" size="42"></u-icon>
客服
......@@ -235,8 +235,6 @@ export default {
merchantIndex:0,//选中的商家下标
middleHeight:0,//中间列表盒子高度
heightArr:[],//元素高度数组
middleTopStyle:'',//中间盒子上部分样式
middleBottomStyle:'',//中间盒子下部分样式
toViewRight:'',//右边滚动到某个元素
toViewLeft:'',//左边滚动到某个元素
toViewFull:'',//全屏滚动到某个元素
......@@ -246,6 +244,8 @@ export default {
middleTopHeight:0,//中间盒子上部分高度
topHeight:0,//上面状态栏+上面导航栏总高度
tabbarOpacity:0,//导航栏透明度
bottomStyle:'',//处理苹果手机的横线,单独增加一个样式
middleStyle:'',//中间盒子样式,单独增加一个样式
}
},
watch: {
......@@ -321,6 +321,12 @@ export default {
let statusBarHeight = uni.getSystemInfoSync().statusBarHeight // 状态栏高度
let capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据
this.topHeight =statusBarHeight+(capsule.top - statusBarHeight) * 2 + capsule.height//整个上部分总高度
//处理苹果手机下面有根横线,影响选中产品明细的操作
let platform = uni.getSystemInfoSync().platform
if(platform=='ios'){
this.bottomStyle='height:140rpx;'
this.middleStyle='padding-bottom:140rpx;'
}
},
onShow() {
//清空之前选中的数据以及状态
......@@ -534,7 +540,7 @@ export default {
//---商家下标切换
merchantTabChange(index){
//点击左边,全屏先置顶
this.toViewFull='middle'
this.toViewFull='middle-bottom'
//点击左边,右边可滚动
this.merchantIndex=index
this.middleHeight=this.scrollHeight
......@@ -558,9 +564,10 @@ export default {
let scrollTop=e.detail.scrollTop
uni.createSelectorQuery().in(this).select('.banner').boundingClientRect(data => {
if(data){
//middleTopHeight中间盒子上部分高度,topHeight为顶部导航栏和状态栏高度和,20为中间盒子的top-20
height=data.height+this.middleTopHeight-this.topHeight-20
this.tabbarOpacity=scrollTop/(data.height-this.topHeight)
//30为中间盒子的top-20和滚动条的margintop值(可以根据效果进行微调,过小可能引起上下一直抖动)
height=data.height+this.middleTopHeight-this.topHeight-30
let opacity=scrollTop/(data.height)
this.tabbarOpacity=parseFloat(opacity.toFixed(2))
if(scrollTop>=height){
//中间上部分固定,中间下部分可滚动,全屏不滚动
this.middleHeight=this.scrollHeight
......@@ -851,7 +858,10 @@ export default {
.scroll-left{
width: 130rpx;
flex-shrink: 0;
margin: 24rpx 24rpx 0 0;
padding: 12px 24rpx 0 0;
}
.scroll-right{
}
.middle-left{
font-size: 24rpx;
......@@ -873,7 +883,7 @@ export default {
}
.merchantlist-wrap{
background: #f7f7f7;
padding-top: 24rpx;
padding-top:24rpx;
}
.merchantlist {
border-radius: 20rpx;
......
......@@ -18,29 +18,11 @@
<view>
尊敬的游客、广大市民:
</view>
<view>
<text>
景区开放时间:
</text>
{{openTime}}
</view>
<view>
<text>
博物馆开放日多媒体设备运行时间:
</text>
09:30 - 12:30;14:30 - 17:30;19:30-21:30(根据景区当天实际情况为准)
</view>
<view>
<text>
免费人群:
</text>
需出示身份证及有效证件原件前往检票处登记入园。
</view>
<view>
<view v-for="(item,index) in extendInfo" :key="index">
<text>
退票须知:
{{item.extendInfoKey}}:
</text>
随时可退,过期未核销自动退
{{item.extendInfoValue}}
</view>
<view style="margin-top: 48rpx;display: flex;justify-content: center;">
<text class="button" @click.stop="goBuy()">立即购票</text>
......@@ -56,8 +38,8 @@ export default {
return {
urlQuery:'',
showKnow:false,
openTime:'',//开放时间
merchantId:'',//商户Id
extendInfo:[],//扩展信息
}
},
onLoad(option) {
......@@ -90,18 +72,7 @@ export default {
}
this.$request('scenic/user/merchant/findDetailInfo',data).then((res)=>{
if(res.code=='00'){
let data=res.data.merchantTitleData||[]
data.forEach(item => {
if (item.titleCode == 'scenic_base_info') {
//基本信息
item.merchantChildTitleData.forEach(item2=> {
if (item2.childTitleCode == '101001') {
//开放时间
this.openTime = item2.contentList[0].content
}
})
}
})
this.extendInfo=res.data.extendInfo||[]
}else{
uni.showToast({
title: res.message,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment