Browse Source

fix site manage time

account
刘嘉炜 3 years ago
parent
commit
3fd6dfe75c
  1. 10
      src/pages/site/manage/manage.vue

10
src/pages/site/manage/manage.vue

@ -156,9 +156,15 @@ export default {
computed: {
//
venueTimeList(){
let { venueList } = this;
if(!venueList.length || !venueList[0] || !venueList[0].items || !venueList[0].items.length)return [];
// return [];
let _venueList = this.venueList || []
if(!_venueList.length || !_venueList[0] || !_venueList[0].items || !_venueList[0].items.length)return [];
let _obj = {};
let _items = _venueList[0].items, _tempArr;
_tempArr = _items.reduce((_arr, val)=>_arr.concat(val.durations.split('-')), []);
//
return [...new Set(_tempArr.splice(0, _tempArr.length-2)), _tempArr[_tempArr.length-1]];
return ([].concat(...venueList[0].items.map(e=>e.durations&&e.durations.split('-')))).filter(e=>{
let _bol = !!_obj[e];
!_bol?_obj[e] = true:'';

Loading…
Cancel
Save