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

Loading…
Cancel
Save