Browse Source

修改bug

修改bug
dangyunlong 3 months ago
parent
commit
5f3ddd31ab

+ 1 - 0
src/layout/components/template/pages/article/sector.vue

@@ -47,6 +47,7 @@ export default {
             component_name:"",
             sort:1,
             componentData:{
+              ad_id:"",//广告位id
               text:"通栏广告", //广告位名称
               width:1200, //广告位宽度
               height:60, //广告位高度

+ 1 - 0
src/layout/components/template/pages/index/sector.vue

@@ -83,6 +83,7 @@ export default {
             component_name:"",
             sort:1,
             componentData:{
+              ad_id:"",//广告位id
               text:"通栏广告", //广告位名称
               width:1200, //广告位宽度
               height:60, //广告位高度

+ 1 - 0
src/layout/components/template/pages/list/sector.vue

@@ -47,6 +47,7 @@ export default {
             component_name:"",
             sort:1,
             componentData:{
+              ad_id:"",//广告位id
               text:"通栏广告", //广告位名称
               width:1200, //广告位宽度
               height:60, //广告位高度

+ 224 - 80
src/store/modules/template.js

@@ -28,6 +28,7 @@ const state = {
   previewStatus:false,//是否预览
   gridKey:0,//使用gridKey来强制更新视图
   loading:false,//是否显示加载中
+  ad_id:"",//生成储存的广告id
   pageData: { //自助建站拖拽板块的数据,注意,这里并不是提交到后台的数据
     index:[
       
@@ -260,6 +261,20 @@ const mutations = {
     //pageStatus==7 自定义详情页
     if(state.pageStatus == 7){}
   },
+  //生成一个随机的广告id
+  getRandomAdid(state){
+    //网站id
+    const websiteId = state.editWebsiteId;
+    // 生成 3 个随机字母 (a-z)
+    const randomLettersOne = Math.random().toString(36).substring(2, 5);  // 生成随机字母并去除前面的 "0."
+    // 获取当前时间戳(毫秒级)
+    const timestamp = Date.now();
+    // 生成 5 个随机字母 (a-z)
+    const randomLettersTwo = Math.random().toString(36).substring(2, 7);  // 生成随机字母并去除前面的 "0."
+    // 拼接时间戳和随机字母生成唯一 ID
+    const ad_id = `${websiteId}${randomLettersOne}${timestamp}${randomLettersTwo}`;
+    state.ad_id = ad_id;
+  },
   //0.全局配置 start------------------------------------------------------------>
   //1.配置模块 start------------------------------------------------------------>
   //获得gridlayout对象
@@ -276,6 +291,7 @@ const mutations = {
         Message.error('最多只能添加10个模块!');
         return;
       }else{
+        console.log(data.jsonData)
         //判断是拖拽的还是点击添加进来的 click=点击
         if(data.source == "click"){
           console.log("通过点击添加一个板块");
@@ -288,19 +304,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.index.length;
-          //添加板块id  
-          state.pageData.index.push({
-            //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
-            i: id,
-            x: 0, 
-            y: maxY + 1, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
-            content:data.jsonData,
-            dataSort:dataSort
-          });
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.index.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.index.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
           console.log("当前添加模块的dataSort为:" + dataSort);
           //当前的页面构建数据
           console.log(state.pageData.index);
@@ -319,19 +353,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.index.length;
-          //添加板块id  
-          state.pageData.index.push({
-            //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
-            i: id,
-            x: data.x, 
-            y: data.y, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
-            content:data.jsonData,
-            dataSort:dataSort
-          });
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.index.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.index.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
           console.log("当前添加模块的dataSort为:" + dataSort);
           //当前的页面构建数据
           console.log(state.pageData.index);
@@ -366,19 +418,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.list.length;
-
-          //添加板块id  
-          state.pageData.list.push({
-            i: id,
-            x: 0, 
-            y: maxY + 1, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            content:data.jsonData,
-            dataSort:dataSort
-          });
-
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.list.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.list.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
         }
 
         //drag=拖拽
@@ -394,19 +464,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.list.length;
-          //添加板块id  
-          state.pageData.list.push({
-            //i: state.pageData.list.length, //base 0.0.1 此方法会导致重复的id出现
-            i: id,
-            x: data.x, 
-            y: data.y, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
-            content:data.jsonData,
-            dataSort:dataSort
-          });
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.list.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.list.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
           console.log("当前添加模块的dataSort为:" + dataSort);
           //当前的页面构建数据
           console.log(state.pageData.list);
@@ -427,6 +515,14 @@ const mutations = {
         Message.error('最多只能添加10个模块!');
         return;
       }else{
+        //判断添加的是否为广告模块 如果是 添加一个ad_id
+        if(data.jsonData.componentList[0].component_type==3){
+          //生成一个随机的ad_id给广告模块
+          this.commit("template/getRandomAdid");
+          console.log("添加广告模块!id为:" + state.ad_id)
+          data.jsonData.componentList[0].componentData.ad_id = state.ad_id;
+        }
+        
         //判断是拖拽的还是点击添加进来的 click=点击
         if(data.source == "click"){
           console.log("通过点击添加一个板块");
@@ -439,19 +535,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.article.length;
-
-          //添加板块id  
-          state.pageData.article.push({
-            i: id,
-            x: 0, 
-            y: maxY + 1, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            content:data.jsonData,
-            dataSort:dataSort
-          });
-
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.article.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.article.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
         }
 
         //drag=拖拽
@@ -467,19 +581,37 @@ const mutations = {
           console.log(data);
           //设置数据在构建json中的位置
           let dataSort = state.pageData.article.length;
-          //添加板块id  
-          state.pageData.article.push({
-            //i: state.pageData.article.length, //base 0.0.1 此方法会导致重复的id出现
-            i: id,
-            x: data.x, 
-            y: data.y, 
-            w: 12, 
-            h: data.h, 
-            type: data.type,
-            //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
-            content:data.jsonData,
-            dataSort:dataSort
-          });
+          //判断添加的是否为广告模块 如果是 添加一个ad_id
+          if(data.jsonData.componentList[0].component_type==3){
+            this.commit("template/getRandomAdid")
+            //添加板块id  
+            state.pageData.article.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              adid: state.ad_id,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }else{
+            state.pageData.article.push({
+              //i: state.pageData.index.length, //base 0.0.1 此方法会导致重复的id出现
+              i: id,
+              x: 0, 
+              y: maxY + 1, 
+              w: 12, 
+              h: data.h, 
+              type: data.type,
+              //sectorData:data.jsonData //base 0.0.1 此问题导致深层数据无法被视图渲染
+              content:data.jsonData,
+              dataSort:dataSort,
+            });
+          }
           console.log("当前添加模块的dataSort为:" + dataSort);
           //当前的页面构建数据
           console.log(state.pageData.article);
@@ -1176,6 +1308,12 @@ const mutations = {
   formatTemplateInfo(state, data) {
     // 深拷贝数据,避免直接修改原数据
     let clonedData = JSON.parse(JSON.stringify(data));
+    // 把ad_id传进去
+    for(let item of clonedData.data){
+      if(item.adid){
+        item.content.componentList[0].componentData.ad_id = item.adid;
+      }
+    }
     // 按照 clonedData.data.y 的大小排序
     clonedData.data.sort((a, b) => a.y - b.y);
     //console.log(clonedData, clonedData);
@@ -1246,9 +1384,15 @@ const mutations = {
     // pageStatus == 2 分类页
     if (state.pageStatus == 2) {}
     // pageStatus == 3 列表页
-    if (state.pageStatus == 3) {}
+    if (state.pageStatus == 3) {
+      Message.warning("暂无模板可用!");
+      state.loading = false;
+    }
     // pageStatus == 4 详情页
-    if (state.pageStatus == 4) {}
+    if (state.pageStatus == 4) {
+      Message.warning("暂无模板可用!");
+      state.loading = false;
+    }
     // pageStatus == 5 搜索页
     if (state.pageStatus == 5) {}
     // pageStatus == 6 自定义列表页

+ 283 - 361
src/utils/templateJson/index/style1/1.js

@@ -1,365 +1,287 @@
 const json = [
-  {
-      "i": 1738974484325,
-      "x": 0,
-      "y": 0,
-      "w": 12,
-      "h": 8,
-      "type": "imgTitleSector",
-      "content": {
-          "sectorName": "imgTitleSector",
-          "componentList": [
-              {
-                  "component_type": 3,
-                  "component_style": 1,
-                  "component_name": "",
-                  "sort": 1,
-                  "componentData": {
-                      "text": "通栏广告",
-                      "width": 1200,
-                      "height": 60
-                  }
-              }
-          ]
-      },
-      "dataSort": 0,
-      "moved": false
-  },
-  {
-      "i": 1738974487549,
-      "x": 0,
-      "y": 8,
-      "w": 12,
-      "h": 33,
-      "type": "bannerSector",
-      "content": {
-          "sectorName": "bannerSector",
-          "componentList": [
-              {
-                  "component_type": 1,
-                  "component_style": 1,
-                  "component_name": "mainTitle",
-                  "sort": 1,
-                  "componentData": {
-                      "category_id": [],
-                      "page": 1,
-                      "pageSize": 1,
-                      "listType": [
-                          "title"
-                      ]
-                  }
-              },
-              {
-                  "component_type": 1,
-                  "component_style": 1,
-                  "component_name": "banner",
-                  "sort": 2,
-                  "componentData": {
-                      "category_id": [],
-                      "page": 1,
-                      "pageSize": 3,
-                      "listType": [
-                          "title",
-                          "imgUrl"
-                      ]
-                  }
-              },
-              {
-                  "component_type": 1,
-                  "component_style": 1,
-                  "component_name": "tabsNews",
-                  "sort": 3,
-                  "componentData": {
-                      "category_id": [],
-                      "page": 1,
-                      "pageSize": 5,
-                      "listType": [
-                          "title",
-                          "created_time",
-                          "introduce"
-                      ]
-                  }
-              }
-          ]
-      },
-      "dataSort": 1,
-      "moved": false
-  },
-  {
-      "i": 1738974490566,
-      "x": 0,
-      "y": 41,
-      "w": 12,
-      "h": 49,
-      "type": "manyPictureSector",
-      "content": {
-          "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"
-                      ]
-                  }
-              }
-          ]
-      },
-      "dataSort": 2,
-      "moved": false
-  },
-  {
-      "i": 1738974498485,
-      "x": 0,
-      "y": 90,
-      "w": 12,
-      "h": 8,
-      "type": "imgTitleSector",
-      "content": {
-          "sectorName": "imgTitleSector",
-          "componentList": [
-              {
-                  "component_type": 3,
-                  "component_style": 1,
-                  "component_name": "",
-                  "sort": 1,
-                  "componentData": {
-                      "text": "通栏广告",
-                      "width": 1200,
-                      "height": 60
-                  }
-              }
-          ]
-      },
-      "dataSort": 3,
-      "moved": false
-  },
-  {
-      "i": 1738974500885,
-      "x": 0,
-      "y": 98,
-      "w": 12,
-      "h": 44,
-      "type": "commentSector",
-      "content": {
-          "sectorName": "commentSector",
-          "componentList": [
-              {
-                  "component_type": 7,
-                  "component_style": 1,
-                  "component_name": "styleTitle",
-                  "sort": 1,
-                  "componentData": {
-                      "text": "板块标题"
-                  }
-              },
-              {
-                  "component_type": 1,
-                  "component_style": 2,
-                  "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": {}
-              }
-          ]
-      },
-      "dataSort": 4,
-      "moved": false
-  },
-  {
-      "i": 1738974503677,
-      "x": 0,
-      "y": 142,
-      "w": 12,
-      "h": 33,
-      "type": "listSector",
-      "content": {
-          "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"
-                      ]
-                  }
-              }
-          ]
-      },
-      "dataSort": 5,
-      "moved": false
-  },
-  {
-      "i": 1738974512397,
-      "x": 0,
-      "y": 175,
-      "w": 12,
-      "h": 8,
-      "type": "imgTitleSector",
-      "content": {
-          "sectorName": "imgTitleSector",
-          "componentList": [
-              {
-                  "component_type": 3,
-                  "component_style": 1,
-                  "component_name": "",
-                  "sort": 1,
-                  "componentData": {
-                      "text": "通栏广告",
-                      "width": 1200,
-                      "height": 60
-                  }
-              }
-          ]
-      },
-      "dataSort": 6,
-      "moved": false
-  },
-  {
-      "i": 1738974513837,
-      "x": 0,
-      "y": 183,
-      "w": 12,
-      "h": 32,
-      "type": "onlyImgSector",
-      "content": {
-          "sectorName": "onlyImgSector",
-          "componentList": [
-              {
-                  "component_type": 1,
-                  "component_style": 1,
-                  "component_name": "",
-                  "sort": 1,
-                  "componentData": {
-                      "category_id": [],
-                      "page": 1,
-                      "pageSize": 7,
-                      "listType": [
-                          "title",
-                          "imgUrl"
-                      ]
-                  }
-              }
-          ]
-      },
-      "dataSort": 7,
-      "moved": false
-  },
-  {
-      "i": 1738974516317,
-      "x": 0,
-      "y": 215,
-      "w": 12,
-      "h": 20,
-      "type": "friendShipLinkSector",
-      "content": {
-          "sectorName": "friendShipLinkSector",
-          "componentList": [
-              {
-                  "component_type": 7,
-                  "component_style": 1,
-                  "component_name": "styleTitle",
-                  "sort": 1,
-                  "componentData": {
-                      "text": "板块标题"
-                  }
-              },
-              {
-                  "component_type": 4,
-                  "component_style": 1,
-                  "component_name": "",
-                  "sort": 1,
-                  "componentData": {}
-              }
-          ]
-      },
-      "dataSort": 8,
-      "moved": false
-  }
+    {
+        "i": 1738997535959,
+        "x": 0,
+        "y": 0,
+        "w": 12,
+        "h": 33,
+        "type": "bannerSector",
+        "content": {
+            "sectorName": "bannerSector",
+            "componentList": [
+                {
+                    "component_type": 1,
+                    "component_style": 1,
+                    "component_name": "mainTitle",
+                    "sort": 1,
+                    "componentData": {
+                        "category_id": [],
+                        "page": 1,
+                        "pageSize": 1,
+                        "listType": [
+                            "title"
+                        ]
+                    }
+                },
+                {
+                    "component_type": 1,
+                    "component_style": 1,
+                    "component_name": "banner",
+                    "sort": 2,
+                    "componentData": {
+                        "category_id": [],
+                        "page": 1,
+                        "pageSize": 3,
+                        "listType": [
+                            "title",
+                            "imgUrl"
+                        ]
+                    }
+                },
+                {
+                    "component_type": 1,
+                    "component_style": 1,
+                    "component_name": "tabsNews",
+                    "sort": 3,
+                    "componentData": {
+                        "category_id": [],
+                        "page": 1,
+                        "pageSize": 5,
+                        "listType": [
+                            "title",
+                            "created_time",
+                            "introduce"
+                        ]
+                    }
+                }
+            ]
+        },
+        "dataSort": 0,
+        "moved": false
+    },
+    {
+        "i": 1738997538031,
+        "x": 0,
+        "y": 33,
+        "w": 12,
+        "h": 49,
+        "type": "manyPictureSector",
+        "content": {
+            "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"
+                        ]
+                    }
+                }
+            ]
+        },
+        "dataSort": 1,
+        "moved": false
+    },
+    {
+        "i": 1738997540254,
+        "x": 0,
+        "y": 82,
+        "w": 12,
+        "h": 44,
+        "type": "commentSector",
+        "content": {
+            "sectorName": "commentSector",
+            "componentList": [
+                {
+                    "component_type": 7,
+                    "component_style": 1,
+                    "component_name": "styleTitle",
+                    "sort": 1,
+                    "componentData": {
+                        "text": "板块标题"
+                    }
+                },
+                {
+                    "component_type": 1,
+                    "component_style": 2,
+                    "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": {}
+                }
+            ]
+        },
+        "dataSort": 2,
+        "moved": false
+    },
+    {
+        "i": 1738997543774,
+        "x": 0,
+        "y": 126,
+        "w": 12,
+        "h": 33,
+        "type": "listSector",
+        "content": {
+            "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"
+                        ]
+                    }
+                }
+            ]
+        },
+        "dataSort": 3,
+        "moved": false
+    },
+    {
+        "i": 1738997544958,
+        "x": 0,
+        "y": 159,
+        "w": 12,
+        "h": 32,
+        "type": "onlyImgSector",
+        "content": {
+            "sectorName": "onlyImgSector",
+            "componentList": [
+                {
+                    "component_type": 1,
+                    "component_style": 1,
+                    "component_name": "",
+                    "sort": 1,
+                    "componentData": {
+                        "category_id": [],
+                        "page": 1,
+                        "pageSize": 7,
+                        "listType": [
+                            "title",
+                            "imgUrl"
+                        ]
+                    }
+                }
+            ]
+        },
+        "dataSort": 4,
+        "moved": false
+    },
+    {
+        "i": 1738997545726,
+        "x": 0,
+        "y": 191,
+        "w": 12,
+        "h": 20,
+        "type": "friendShipLinkSector",
+        "content": {
+            "sectorName": "friendShipLinkSector",
+            "componentList": [
+                {
+                    "component_type": 7,
+                    "component_style": 1,
+                    "component_name": "styleTitle",
+                    "sort": 1,
+                    "componentData": {
+                        "text": "板块标题"
+                    }
+                },
+                {
+                    "component_type": 4,
+                    "component_style": 1,
+                    "component_name": "",
+                    "sort": 1,
+                    "componentData": {}
+                }
+            ]
+        },
+        "dataSort": 5,
+        "moved": false
+    }
 ]
 
 export default json;

+ 42 - 161
src/utils/templateJson/index/style1/2.js

@@ -1,40 +1,42 @@
 const json = [
     {
-        "i": 1738974893638,
+        "i": 1738997623000,
         "x": 0,
         "y": 0,
         "w": 12,
-        "h": 33,
-        "type": "bannerSector",
+        "h": 49,
+        "type": "manyPictureSector",
         "content": {
-            "sectorName": "bannerSector",
+            "sectorName": "manyPictureSector",
             "componentList": [
                 {
-                    "component_type": 1,
+                    "component_type": 7,
                     "component_style": 1,
-                    "component_name": "mainTitle",
+                    "component_name": "styleTitle",
                     "sort": 1,
                     "componentData": {
-                        "category_id": [],
-                        "page": 1,
-                        "pageSize": 1,
-                        "listType": [
-                            "title"
-                        ]
+                        "text": "板块标题"
                     }
                 },
                 {
-                    "component_type": 1,
+                    "component_type": 6,
                     "component_style": 1,
-                    "component_name": "banner",
+                    "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",
-                            "imgUrl"
+                            "created_time"
                         ]
                     }
                 },
@@ -42,15 +44,14 @@ const json = [
                     "component_type": 1,
                     "component_style": 1,
                     "component_name": "tabsNews",
-                    "sort": 3,
+                    "sort": 4,
                     "componentData": {
                         "category_id": [],
                         "page": 1,
-                        "pageSize": 5,
+                        "pageSize": 3,
                         "listType": [
                             "title",
-                            "created_time",
-                            "introduce"
+                            "created_time"
                         ]
                     }
                 }
@@ -60,9 +61,9 @@ const json = [
         "moved": false
     },
     {
-        "i": 1738974900821,
+        "i": 1738997626974,
         "x": 0,
-        "y": 33,
+        "y": 49,
         "w": 12,
         "h": 33,
         "type": "listSector",
@@ -114,101 +115,14 @@ const json = [
         "moved": false
     },
     {
-        "i": 1738974904278,
-        "x": 0,
-        "y": 66,
-        "w": 12,
-        "h": 8,
-        "type": "imgTitleSector",
-        "content": {
-            "sectorName": "imgTitleSector",
-            "componentList": [
-                {
-                    "component_type": 3,
-                    "component_style": 1,
-                    "component_name": "",
-                    "sort": 1,
-                    "componentData": {
-                        "text": "通栏广告",
-                        "width": 1200,
-                        "height": 60
-                    }
-                }
-            ]
-        },
-        "dataSort": 2,
-        "moved": false
-    },
-    {
-        "i": 1738974910381,
-        "x": 0,
-        "y": 74,
-        "w": 12,
-        "h": 49,
-        "type": "manyPictureSector",
-        "content": {
-            "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"
-                        ]
-                    }
-                }
-            ]
-        },
-        "dataSort": 3,
-        "moved": false
-    },
-    {
-        "i": 1738974918446,
+        "i": 1738997629824,
         "x": 0,
-        "y": 123,
+        "y": 82,
         "w": 12,
-        "h": 33,
-        "type": "listSector",
+        "h": 44,
+        "type": "commentSector",
         "content": {
-            "sectorName": "listSector",
+            "sectorName": "commentSector",
             "componentList": [
                 {
                     "component_type": 7,
@@ -221,69 +135,36 @@ const json = [
                 },
                 {
                     "component_type": 1,
-                    "component_style": 1,
-                    "component_name": "listNews",
+                    "component_style": 2,
+                    "component_name": "tabsCalendarNews",
                     "sort": 2,
                     "componentData": {
                         "category_id": [],
                         "page": 1,
-                        "pageSize": 5,
+                        "pageSize": 6,
                         "listType": [
                             "title",
-                            "created_time"
+                            "created_time",
+                            "introduce"
                         ]
                     }
                 },
                 {
-                    "component_type": 1,
+                    "component_type": 8,
                     "component_style": 1,
-                    "component_name": "listNews",
+                    "component_name": "calendar",
                     "sort": 3,
-                    "componentData": {
-                        "category_id": [],
-                        "page": 1,
-                        "pageSize": 5,
-                        "listType": [
-                            "title",
-                            "created_time"
-                        ]
-                    }
-                }
-            ]
-        },
-        "dataSort": 4,
-        "moved": false
-    },
-    {
-        "i": 1738974923781,
-        "x": 0,
-        "y": 156,
-        "w": 12,
-        "h": 8,
-        "type": "imgTitleSector",
-        "content": {
-            "sectorName": "imgTitleSector",
-            "componentList": [
-                {
-                    "component_type": 3,
-                    "component_style": 1,
-                    "component_name": "",
-                    "sort": 1,
-                    "componentData": {
-                        "text": "通栏广告",
-                        "width": 1200,
-                        "height": 60
-                    }
+                    "componentData": {}
                 }
             ]
         },
-        "dataSort": 5,
+        "dataSort": 2,
         "moved": false
     },
     {
-        "i": 1738974933093,
+        "i": 1738997631878,
         "x": 0,
-        "y": 164,
+        "y": 126,
         "w": 12,
         "h": 32,
         "type": "onlyImgSector",
@@ -307,13 +188,13 @@ const json = [
                 }
             ]
         },
-        "dataSort": 6,
+        "dataSort": 3,
         "moved": false
     },
     {
-        "i": 1738974934365,
+        "i": 1738997637782,
         "x": 0,
-        "y": 196,
+        "y": 158,
         "w": 12,
         "h": 20,
         "type": "friendShipLinkSector",
@@ -338,7 +219,7 @@ const json = [
                 }
             ]
         },
-        "dataSort": 7,
+        "dataSort": 4,
         "moved": false
     }
 ]

+ 21 - 0
src/views/dashboard/admin/index.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="dashboard-editor-container">
+    <!--超级管理员-->
     <div v-if="userType==10000">
       <!--网站,内容,公共栏目数量 start------------------------------------------>
       <el-row :gutter="32">
@@ -62,6 +63,7 @@
       </el-row>
       <!--chart end------------------------------------------>
     </div>
+    <!--调研员-->
     <div v-if="userType==4">
       <el-row :gutter="32">
         <el-col :xs="24" :sm="24" :lg="24">
@@ -74,6 +76,16 @@
         </el-col>
       </el-row>
     </div>
+    <!--个人会员-->
+    <div v-if="userType==1">
+      <el-row :gutter="32">
+        <el-col :xs="24" :sm="24" :lg="24">
+          <div class="noData">
+            欢迎使用恒星管理平台
+          </div>
+        </el-col>
+      </el-row>
+    </div>
   </div>
 </template>
 
@@ -240,6 +252,15 @@ export default {
     }
   }
 
+  .noData {
+    color: #CCCCCC;
+    font-size: 32px;
+    font-weight: bold;
+    text-align: center;
+    height: 740px;
+    line-height: 740px;
+  }
+
   .dashboard-editor-container {
     padding: 32px;
     background-color: rgb(240, 242, 245);