Commit 152a5b2e authored by 潘永坪's avatar 潘永坪

购票须知修改

parent 3bfaf4d5
<!-- 修改这个页面时,需要同步更新combiChoose页面的代码 --> <!-- 修改这个页面时,需要同步更新combiChoose页面的代码 -->
<template> <template>
<view class="wrap"> <view class="wrap">
<scroll-view @scroll="scrollFull" style="height: 100%;" scroll-y> <scroll-view @scroll="scrollFull" style="height: 100%;" scroll-y>
<view class="banner"> <view class="banner">
<u-swiper :list="imgList" @change="e => currentNum = e.current" indicatorStyle="right: 20px;bottom:25px" height="400" circular> <u-swiper :list="imgList" @change="e => currentNum = e.current" indicatorStyle="right: 20px;bottom:25px" height="400" circular>
<view slot="indicator" class="indicator-num"> <view slot="indicator" class="indicator-num">
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</view> </view>
</view> </view>
<view class="middle-bottom" :style="middleBottomStyle"> <view class="middle-bottom" :style="middleBottomStyle">
<scroll-view class="scroll-left" :style="{height:middleHeight+'px'}" :scroll-into-view="toViewLeft" scroll-y> <scroll-view class="scroll-left" :style="{height:scrlllHeight+'px'}" :scroll-into-view="toViewLeft" scroll-y>
<view class="middle-left"> <view class="middle-left">
<view :id="'merchant-tab'+index" class="merchant-tab" v-for="(item,index) in scenicList" :key="index" @click="merchantTabChange(index)" :class='{on:merchantIndex==index}'> <view :id="'merchant-tab'+index" class="merchant-tab" v-for="(item,index) in scenicList" :key="index" @click="merchantTabChange(index)" :class='{on:merchantIndex==index}'>
{{item.name}} {{item.name}}
...@@ -214,18 +214,19 @@ export default { ...@@ -214,18 +214,19 @@ export default {
chooseProduct: [], //选中的产品 chooseProduct: [], //选中的产品
showModal: false, //是否显示模态框 showModal: false, //是否显示模态框
chooseMerchantProduct: '', //不支持多产品购买时,选中的景区产品 chooseMerchantProduct: '', //不支持多产品购买时,选中的景区产品
showBusiness:false,//用于是否显示营业中
showPauseBusiness:false,//用于显示暂停营业
toViewRight:'',//右边滚动到某个元素
toViewLeft:'',//左边滚动到某个元素
merchantIndex:0,//选中的商家下标 merchantIndex:0,//选中的商家下标
middleHeight:0,//中间列表盒子高度 middleHeight:0,//中间列表盒子高度
heightArr:[],//元素高度数组 heightArr:[],//元素高度数组
toViewRight:'',//右边滚动到某个元素
toViewLeft:'',//左边滚动到某个元素
showBusiness:false,//用于是否显示营业中
showPauseBusiness:false,//用于显示暂停营业
middleInfoStyle:'',//中间盒子上部分样式 middleInfoStyle:'',//中间盒子上部分样式
middleBottomStyle:'',//中间盒子下部分样式 middleBottomStyle:'',//中间盒子下部分样式
infoHeight:0,//middle-info盒子高度 infoHeight:0,//middle-info盒子高度
scrlllHeight:0,//中间盒子滚动时的高度 scrlllHeight:0,//中间盒子滚动时的高度
originHeight:0,//中间盒子原本高度 originHeight:0,//中间盒子原本高度
} }
}, },
watch: { watch: {
...@@ -452,9 +453,10 @@ export default { ...@@ -452,9 +453,10 @@ export default {
//获取商家列表各个元素的高度,并且把他们前后相加添加到一个数组里面 //获取商家列表各个元素的高度,并且把他们前后相加添加到一个数组里面
if(data){ if(data){
if(i==0){ if(i==0){
this.heightArr.push(data.height) //取整,由于高度多数为小数,防止点击左边,滚动右边时出现bug
this.heightArr.push(parseInt(data.height))
}else{ }else{
this.heightArr.push(data.height+this.heightArr[i-1]) this.heightArr.push(parseInt(data.height)+this.heightArr[i-1])
} }
} }
}).exec() }).exec()
...@@ -528,6 +530,7 @@ export default { ...@@ -528,6 +530,7 @@ export default {
this.$nextTick(()=>{ this.$nextTick(()=>{
this.merchantIndex=index this.merchantIndex=index
this.toViewRight='merchant'+index this.toViewRight='merchant'+index
}) })
}, },
//---展示明细弹窗 //---展示明细弹窗
...@@ -562,12 +565,6 @@ export default { ...@@ -562,12 +565,6 @@ export default {
scrollRight(e) { scrollRight(e) {
setTimeout(()=>{ setTimeout(()=>{
let scrollTop=e.detail.scrollTop let scrollTop=e.detail.scrollTop
// if(scrollTop==0){
// //当滑到顶部时,上面固定元素还原
// this.middleInfoStyle='position:relative;'
// this.middleBottomStyle='margin-top:0'
// this.middleHeight=3000
// }
//通过滚动值获取下标 //通过滚动值获取下标
this.heightArr.forEach((item,i)=>{ this.heightArr.forEach((item,i)=>{
if(i==0){ if(i==0){
......
<template>
<view class="wrap">
<image src="../../../static/img/hghg/hghgBg.jpg" class="bgImage"></image>
<view class="btn-wrap">
<view>
<text class="button" @click="goKnow()">购票须知</text>
</view>
<view style="margin-top: 100rpx;">
<text class="button" @click="goBuy()">立即购票</text>
</view>
</view>
<!-- 购票须知 -->
<view class="buy-know" v-if="showKnow" @click="showKnow=false">
<view class="box">
<view class="title">
告游客书
</view>
<view>
尊敬的游客、广大市民:
</view>
<view>
<text>
景区开放时间:
</text>
{{openTime}}(21:00停止售票入馆)。
</view>
<view>
<text>
博物馆开放日多媒体设备运行时间:
</text>
09:30 - 12:30;14:30 - 17:30;19:30-21:30(根据景区当天实际情况为准)
</view>
<view>
<text>
免费人群:
</text>
需出示身份证及有效证件原件前往检票处登记入园。
</view>
<view>
<text>
退票须知:
</text>
随时可退,过期未核销自动退。
</view>
<view style="margin-top: 48rpx;display: flex;justify-content: center;">
<text class="button" @click.stop="goBuy()">立即购票</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
urlQuery:'',
showKnow:false,
openTime:'',//开放时间
merchantId:'',//商户Id
}
},
onLoad(option) {
let channelId=option.channelId||''
let companyId=option.companyId||''
let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||''
this.merchantId=option.merchantId||''
this.urlQuery=channelId+'&merchantId='+this.merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId
},
methods: {
//---购票
goBuy(){
uni.navigateTo({
url:'/pages/combination/distributionCombiChoose/distributionCombiChoose?channelId='+this.urlQuery
})
},
//---购票须知
goKnow(){
this.showKnow=true
this.initDetail()
},
//---初始化详情
initDetail(){
let data={
userId:uni.getStorageSync('userId')||'',
openid:uni.getStorageSync('openid')||'',
id:this.merchantId,
isDetail:1,//商户详情
}
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
}
})
}
})
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
}
}
</script>
<style scoped>
.wrap{
height: 100%;
font-size: 40rpx;
display: flex;
align-items: center;
justify-content:center;
}
.bgImage{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.btn-wrap{
position: relative;
top: -160rpx;
}
.button{
width: 520rpx;
height: 112rpx;
display:flex;
align-items: center;
justify-content: center;
background: url('../../../static/img/hghg/bigBtn.png') no-repeat;
background-size: 100% 100%;
}
.buy-know{
padding: 0 48rpx;
display: flex;
align-items: center;
justify-content: center;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
}
.box{
padding: 60rpx 40rpx;
background: url('../../../static/img/hghg/dialog.png') no-repeat;
background-size: 100% 100%;
color: #000000;
font-size: 28rpx;
}
.box>view{
margin-top: 10rpx;
}
.box view text{
font-weight: bold;
}
.title{
font-weight: bold;
font-size: 40rpx;
text-align: center;
}
.button{
display: flex;
width: 244rpx;
height: 96rpx;
background: url('../../../static/img/hghg/smallBtn.png') no-repeat;
background-size: 100% 100%;
align-items: center;
justify-content: center;
font-size: 32rpx;
}
</style>
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