Browse Source

后端联调开始4

dev
dai_siki 6 years ago
parent
commit
9e01d2456c
  1. 30
      epmet-oper-web/src/views/modules/wx-mini/index-set.vue

30
epmet-oper-web/src/views/modules/wx-mini/index-set.vue

@ -710,15 +710,27 @@ export default {
},
//
checkCptRegion (item) {
const { componentFrontId } = item
const fun = name => name === componentFrontId
if (['resi-titleList-home-gridNameTitle'].findIndex(fun) !== -1) {
const { region } = item
// const { componentFrontId } = item
// const fun = name => name === componentFrontId
// if (['resi-titleList-home-gridNameTitle'].findIndex(fun) !== -1) {
// return 'top'
// } else if (['resi-topList-voice-hotNewsSwiper'].findIndex(fun) !== -1) {
// return 'ban'
// } else if (['resi-functionList-extend-moreFunctionIcons', 'resi-functionList-group-recommendGroupSlider', 'resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1) {
// return 'cnt'
// } else if (['resi-floatingList-mine-newMessageButton'].findIndex(fun) !== -1) {
// return 'fixed'
// } else {
// return 'none'
// }
if (region === 'titleList') {
return 'top'
} else if (['resi-topList-voice-hotNewsSwiper'].findIndex(fun) !== -1) {
} else if (region === 'topList') {
return 'ban'
} else if (['resi-functionList-extend-moreFunctionIcons', 'resi-functionList-group-recommendGroupSlider', 'resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1) {
} else if (region === 'functionList') {
return 'cnt'
} else if (['resi-floatingList-mine-newMessageButton'].findIndex(fun) !== -1) {
} else if (region === 'floatingList') {
return 'fixed'
} else {
return 'none'
@ -727,8 +739,10 @@ export default {
//
checkCptReuse (item) {
const { componentFrontId } = item
const reuseList = this.cptTypeList[0].componentList.map(v => v.componentFrontId)
const fun = name => name === componentFrontId
return ['resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1
// return ['resi-functionList-hall-hotSubjectList'].findIndex(fun) !== -1
return reuseList.findIndex(fun) !== -1
},
//
getCptRegionName (id) {
@ -781,7 +795,7 @@ export default {
console.log('添加组件到实例')
let trueItem = cloneDeep(item)
trueItem.tempOnlyId = tempOnlyId
trueItem.region = region
trueItem.localRegion = region
trueItem.displayOrder = displayOrder
this.cptList.push(trueItem)
},

Loading…
Cancel
Save