|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="sectorBox">
|
|
|
- <div class="sectorItemBox" @click="addIndexModule('headSector',19)">
|
|
|
+ <!-- <div class="sectorItemBox" @click="addIndexModule('headSector',19)">
|
|
|
<div class="sectorItem">
|
|
|
<img src="@/assets/template/sector/headSector.png" />
|
|
|
</div>
|
|
@@ -11,55 +11,55 @@
|
|
|
<img src="@/assets/template/sector/menuSector.png" />
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">网站导航</div>
|
|
|
- </div>
|
|
|
- <div class="sectorItemBox" @click="addIndexModule('imgTitleSector',6)">
|
|
|
+ </div> -->
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('imgTitleSector',6,imgTitleSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/imgTitleSector.png" />
|
|
|
+ <img src="@/assets/template/sector/imgTitleSector.png"/>
|
|
|
</div>
|
|
|
- <div class="sectorItemTitle">图片标题</div>
|
|
|
+ <div class="sectorItemTitle">通栏广告</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('bannerSector',34,bannerSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/bannerSector.png" @click="addIndexModule('bannerSector',34)"/>
|
|
|
+ <img src="@/assets/template/sector/bannerSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">焦点图</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('manyPictureSector',41,manyPictureSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/moreServicesSector.png" @click="addIndexModule('manyPictureSector',41)"/>
|
|
|
+ <img src="@/assets/template/sector/moreServicesSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">多图菜单</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('commentSector',40,commentSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/commentSector.png" @click="addIndexModule('commentSector',40)"/>
|
|
|
+ <img src="@/assets/template/sector/commentSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">文章列表带评论</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('listSector',28,listSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/newsSector.png" @click="addIndexModule('listSector',28)"/>
|
|
|
+ <img src="@/assets/template/sector/newsSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">文章列表</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('onlyImgSector',24,onlyImgSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/imgSector.png" @click="addIndexModule('onlyImgSector',24)"/>
|
|
|
+ <img src="@/assets/template/sector/imgSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">纯图片组合</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <div class="sectorItemBox" @click="addIndexModule('friendShipLinkSector',15,friendShipLinkSector)">
|
|
|
<div class="sectorItem">
|
|
|
- <img src="@/assets/template/sector/linkSector.png" @click="addIndexModule('friendShipLinkSector',15)"/>
|
|
|
+ <img src="@/assets/template/sector/linkSector.png"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">友情链接</div>
|
|
|
</div>
|
|
|
- <div class="sectorItemBox">
|
|
|
+ <!-- <div class="sectorItemBox">
|
|
|
<div class="sectorItem">
|
|
|
<img src="@/assets/template/sector/footerSector.png" @click="addIndexModule('footerSector',38)"/>
|
|
|
</div>
|
|
|
<div class="sectorItemTitle">页尾板块</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -73,14 +73,263 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
-
|
|
|
+ //添加通栏广告模块 start---------------------------------------->
|
|
|
+ imgTitleSector:{
|
|
|
+ sectorName:"imgTitleSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:3,//组件类型 1=新闻(单个) 2=新闻(多个) 3=广告 4=友情链接 5=底部导航 6=静态html组件 7=文字 8=评论
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"",
|
|
|
+ sort:1,
|
|
|
+ componentList:[]//该组件不请求指定类型的数据,但是后端需要返回imgUrl
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //添加通栏广告模块 start---------------------------------------->
|
|
|
+
|
|
|
+ //添加banner模块 start---------------------------------------->
|
|
|
+ bannerSector:{
|
|
|
+ sectorName:"bannerSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:1,//组件类型 1=新闻(单个) 2=新闻(多个) 3=广告 4=友情链接 5=底部导航 6=静态html组件 7=文字 8=评论
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"mainTitle",//组件名称
|
|
|
+ sort:1,//组件排序
|
|
|
+ componentData:{//该组件请求的数据
|
|
|
+ category_id:[],//请求的导航id 如果上面的component_type是1,这里只会有1个[[1]],如果是2,这里就会有多个[[1,3],[1,4,8]]
|
|
|
+ page:1,//请求第几页
|
|
|
+ pageSize:1,//请求的条数
|
|
|
+ listType:[//请求的数据应该包含哪些字段
|
|
|
+ "title",//标题
|
|
|
+ //"created_time",//创建时间
|
|
|
+ //"author",//作者
|
|
|
+ //"imgUrl",//缩略图片
|
|
|
+ //"introduce",//描述
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,
|
|
|
+ component_name:"banner",
|
|
|
+ sort:2,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:3,
|
|
|
+ listType:[
|
|
|
+ "imgUrl"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,
|
|
|
+ component_name:"tabsNews",
|
|
|
+ sort:3,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:5,
|
|
|
+ listType:[
|
|
|
+ "imgUrl",
|
|
|
+ "created_time",
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //添加banner模块 end---------------------------------------->
|
|
|
+
|
|
|
+ //添加多图板块 start---------------------------------------->
|
|
|
+ manyPictureSector:{
|
|
|
+ sectorName:"manyPictureSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:7, //纯文本
|
|
|
+ component_style:1,
|
|
|
+ component_name:"styleTitle",
|
|
|
+ sort:1,
|
|
|
+ componentData:{
|
|
|
+ text:"板块标题"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:6, //静态组件无需传递数据
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"fivePicture",
|
|
|
+ sort:2,
|
|
|
+ componentData:{}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"tabsNews",
|
|
|
+ sort:3,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:3,
|
|
|
+ listType:[
|
|
|
+ "title",//标题
|
|
|
+ "created_time",//创建时间
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"tabsNews",
|
|
|
+ sort:4,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:3,
|
|
|
+ listType:[
|
|
|
+ "title",//标题
|
|
|
+ "created_time",//创建时间
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //添加多图板块 end---------------------------------------->
|
|
|
+
|
|
|
+ //文章列表带评论板块 end---------------------------------------->
|
|
|
+ commentSector:{
|
|
|
+ sectorName:"commentSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:7, //纯文本
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"styleTitle",
|
|
|
+ sort:1,
|
|
|
+ componentData:{
|
|
|
+ text:"板块标题"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"tabsCalendarNews",
|
|
|
+ sort:2,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:6,
|
|
|
+ listType:[
|
|
|
+ "title",
|
|
|
+ "created_time",
|
|
|
+ "introduce"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:8,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"calendar", //评论组件无需提交数据
|
|
|
+ sort:3,
|
|
|
+ componentData:{}
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //文章列表带评论板块 end---------------------------------------->
|
|
|
+
|
|
|
+ //文章列表板块 start---------------------------------------->
|
|
|
+ listSector:{
|
|
|
+ sectorName:"listSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:7, //纯文本
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"styleTitle",
|
|
|
+ sort:1,
|
|
|
+ componentData:{
|
|
|
+ text:"板块标题"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"listNews",
|
|
|
+ sort:2,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:5,
|
|
|
+ listType:[
|
|
|
+ "title",
|
|
|
+ "created_time"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"listNews",
|
|
|
+ sort:3,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:5,
|
|
|
+ listType:[
|
|
|
+ "title",
|
|
|
+ "created_time"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //文章列表板块 end---------------------------------------->
|
|
|
+
|
|
|
+ //纯图片组合 start---------------------------------------->
|
|
|
+ onlyImgSector:{
|
|
|
+ sectorName:"onlyImgSector",//板块名称
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:1,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"",
|
|
|
+ sort:1,
|
|
|
+ componentData:{
|
|
|
+ category_id:[],
|
|
|
+ page:1,
|
|
|
+ pageSize:7,
|
|
|
+ listType:[
|
|
|
+ "title",
|
|
|
+ "imgUrl"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ //纯图片组合 end---------------------------------------->
|
|
|
+
|
|
|
+ //友情链接板块 start---------------------------------------->
|
|
|
+ friendShipLinkSector:{
|
|
|
+ sectorName:"friendShipLinkSector",//友情链接无需提交数据
|
|
|
+ componentList:[
|
|
|
+ {
|
|
|
+ component_type:4,
|
|
|
+ component_style:1,//该组件使用哪个展示样式
|
|
|
+ component_name:"",
|
|
|
+ sort:1,
|
|
|
+ componentData:{}
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ //友情链接板块 end---------------------------------------->
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- addIndexModule(type,h){
|
|
|
+ addIndexModule(type,h,jsonData){
|
|
|
let data = {
|
|
|
type: type,
|
|
|
- h: h
|
|
|
+ h: h,
|
|
|
+ jsonData: jsonData
|
|
|
}
|
|
|
console.log(data);
|
|
|
this.$store.commit('template/addIndexModule',data);
|