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

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

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