|
@ -19,11 +19,16 @@ const props = defineProps({ |
|
|
venueLs: { |
|
|
venueLs: { |
|
|
type: Array, |
|
|
type: Array, |
|
|
default: [] |
|
|
default: [] |
|
|
|
|
|
}, |
|
|
|
|
|
gatherLs: { |
|
|
|
|
|
type: Array, |
|
|
|
|
|
default: [] |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
const gatherList = computed({ |
|
|
const gatherList = computed({ |
|
|
get(){ |
|
|
get(){ |
|
|
|
|
|
if(props?.gatherLs?.length)return props?.gatherLs; |
|
|
return formatVenueLs(props.venueLs); |
|
|
return formatVenueLs(props.venueLs); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
@ -41,7 +46,7 @@ function formatVenueLs(list){ |
|
|
if(!v?.length)return; |
|
|
if(!v?.length)return; |
|
|
let _name, start, end, lastIdx; |
|
|
let _name, start, end, lastIdx; |
|
|
v.forEach(ele=>{ |
|
|
v.forEach(ele=>{ |
|
|
let [ _st, _et ] = (ele.time).split('-'); |
|
|
|
|
|
|
|
|
let [ _st, _et ] = (ele?.time ?? ele?.duration).split('-'); |
|
|
if(_name&&ele.index !== (lastIdx + 1)){ |
|
|
if(_name&&ele.index !== (lastIdx + 1)){ |
|
|
showArr.push({ name: _name, duration: `${start}-${end}` }); |
|
|
showArr.push({ name: _name, duration: `${start}-${end}` }); |
|
|
start = _st; |
|
|
start = _st; |
|
@ -69,14 +74,14 @@ function formatVenueLs(list){ |
|
|
<view class="sbi-name">预定场次:</view> |
|
|
<view class="sbi-name">预定场次:</view> |
|
|
<view class="sbi-time-range"> |
|
|
<view class="sbi-time-range"> |
|
|
<block v-for="(e, i) in gatherList" :key=i> |
|
|
<block v-for="(e, i) in gatherList" :key=i> |
|
|
<view class="str-item">{{ e.name || '几号馆' }} {{ e.duration || '时间段' }}</view> |
|
|
|
|
|
|
|
|
<view class="str-item">{{ e.name || '-' }} {{ e.duration ?? e.time ?? '-' }}</view> |
|
|
</block> |
|
|
</block> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="vmm-line" v-if='isShowSpecificTime'> |
|
|
<view class="vmm-line" v-if='isShowSpecificTime'> |
|
|
<view>具体场次:</view> |
|
|
<view>具体场次:</view> |
|
|
<view> |
|
|
<view> |
|
|
<view v-for="(e,i) in venueLs" :key="i">{{ e.venue_name ?? '' }} {{ e.time ?? '' }} ({{ e?.price ?? 0 }}元)</view> |
|
|
|
|
|
|
|
|
<view v-for="(e,i) in venueLs" :key="i">{{ e.venue_name ?? '' }} {{ e.time ?? e?.duration ?? '' }} ({{ e?.price ?? 0 }}元)</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="soi-fold-btn" @click="isShowSpecificTime = !isShowSpecificTime"> |
|
|
<view class="soi-fold-btn" @click="isShowSpecificTime = !isShowSpecificTime"> |
|
|