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

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

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