|
|
@ -1,8 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div class="hom-page home_page_content"> |
|
|
|
<!-- 头部 --> |
|
|
|
<FixedHead v-if="isShowCavansHead"> |
|
|
|
<category-list @tabChange="tabChange"></category-list> |
|
|
|
<FixedHead v-if="isShowCavansHead" |
|
|
|
:componentContent="headComponentsData.componentContent"> |
|
|
|
<category-list @tabChange="tabChange" v-if="false"></category-list> |
|
|
|
</FixedHead> |
|
|
|
<!-- 首页画布骨架屏 --> |
|
|
|
|
|
|
@ -81,7 +82,24 @@ export default { |
|
|
|
terminal: API.terminal, |
|
|
|
activeTab: 0, |
|
|
|
componentsData: [], |
|
|
|
headComponentsData : {}, |
|
|
|
headComponentsData : { |
|
|
|
title: '', |
|
|
|
iconClass: 'icon-dianputoubu', |
|
|
|
type: 'header', |
|
|
|
undraggable: true, // 不可拖动 |
|
|
|
onlyAdmin: true, // 平台端显示 |
|
|
|
onlyApp: true, // 只在app显示 |
|
|
|
componentContent: { |
|
|
|
logoType:1, |
|
|
|
imageUrl: '', |
|
|
|
title: '', |
|
|
|
fontSizeNum: '', |
|
|
|
textFontW: 'normal', |
|
|
|
titColor: '#CD5353', |
|
|
|
showTitle: 1, |
|
|
|
useSelfTitle : 2, |
|
|
|
} |
|
|
|
}, |
|
|
|
typeId: 1, |
|
|
|
scrollTop: 0 |
|
|
|
} |
|
|
@ -109,7 +127,12 @@ export default { |
|
|
|
if (JSON.stringify(data) !== '{}') { |
|
|
|
this.componentsData = JSON.parse(data.json) |
|
|
|
let headIndex = this.componentsData.findIndex(item => item.type==='header') |
|
|
|
if(headIndex < 0){ |
|
|
|
this.headComponentsData = {} |
|
|
|
if(headIndex >= 0){ |
|
|
|
this.headComponentsData = this.componentsData[headIndex] |
|
|
|
this.componentsData.splice(headIndex, 1) |
|
|
|
} |
|
|
|
if(!this.headComponentsData.title){ |
|
|
|
this.headComponentsData = { |
|
|
|
title: '商城头部', |
|
|
|
iconClass: 'icon-dianputoubu', |
|
|
@ -128,13 +151,8 @@ export default { |
|
|
|
useSelfTitle : 2, |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.headComponentsData = this.componentsData[headIndex] |
|
|
|
} |
|
|
|
if(this.headComponentsData == 2 && headIndex >= 0){ |
|
|
|
this.componentsData.splice(headIndex, 1) |
|
|
|
} |
|
|
|
this.isShowCavansHead = this.headComponentsData == 2 |
|
|
|
this.isShowCavansHead = true |
|
|
|
this.isFirst = false |
|
|
|
this.loading = false |
|
|
|
} |
|
|
|