Commit bc2709d5 authored by 潘永坪's avatar 潘永坪

湖广会馆购票须知开放时间处理

parent a189f6d8
...@@ -116,10 +116,10 @@ export default { ...@@ -116,10 +116,10 @@ export default {
this.travelTips = '' this.travelTips = ''
if (newValue.merchantTitleData && newValue.merchantTitleData.length > 0) { if (newValue.merchantTitleData && newValue.merchantTitleData.length > 0) {
let openTime = '' let openTime = ''
newValue.merchantTitleData.forEach((item, index) => { newValue.merchantTitleData.forEach((item) => {
if (item.titleCode == 'scenic_base_info') { if (item.titleCode == 'scenic_base_info') {
//基本信息 //基本信息
item.merchantChildTitleData.forEach((items, index) => { item.merchantChildTitleData.forEach((items) => {
if (items.childTitleCode == '101001') { if (items.childTitleCode == '101001') {
//开放时间 //开放时间
openTime = items.contentList openTime = items.contentList
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
} }
}) })
if (openTime.length > 0) { if (openTime.length > 0) {
this.times = openTime.map((item, index) => { this.times = openTime.map((item) => {
return item.content.split(';') return item.content.split(';')
}) })
} }
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<text> <text>
开放时间: 开放时间:
</text> </text>
09:00 - 18:00,闭馆前1小时(17:00)停止售票 {{openTime}}
</view> </view>
<view> <view>
<text> <text>
...@@ -55,7 +55,8 @@ export default { ...@@ -55,7 +55,8 @@ export default {
data() { data() {
return { return {
urlQuery:'', urlQuery:'',
showKnow:false showKnow:false,
openTime:'09:00 - 18:00,闭馆前1小时(17:00)停止售票',//开放时间
} }
}, },
onLoad(option) { onLoad(option) {
...@@ -65,6 +66,7 @@ export default { ...@@ -65,6 +66,7 @@ export default {
let groupId=option.groupId||'' let groupId=option.groupId||''
let groupChannelId=option.groupChannelId||'' let groupChannelId=option.groupChannelId||''
this.urlQuery=channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId this.urlQuery=channelId+'&merchantId='+merchantId+'&groupId='+groupId+'&groupChannelId='+groupChannelId+'&companyId='+companyId
this.initDetail(merchantId)
}, },
methods: { methods: {
//---购票 //---购票
...@@ -76,7 +78,37 @@ export default { ...@@ -76,7 +78,37 @@ export default {
//---购票须知 //---购票须知
goKnow(){ goKnow(){
this.showKnow=true this.showKnow=true
} },
//---初始化详情
initDetail(merchantId){
let data={
userId:uni.getStorageSync('userId')||'',
openid:uni.getStorageSync('openid')||'',
id: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.content
}
})
}
})
}else{
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
} }
} }
</script> </script>
......
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