浏览代码

自助建站紧急修复:列表页与频道页二级菜单通栏冲突

自助建站紧急修复:列表页与频道页二级菜单通栏冲突
dangyunlong 2 天之前
父节点
当前提交
c438404d01

+ 1 - 0
src/store/modules/template.js

@@ -527,6 +527,7 @@ const mutations = {
             }
             Message.success('模块已删除!');
             console.log(`模块已删除,当前${currentPageName}页面的构建数据为:`, newModules);
+            console.log(state.pageData.list);
         } catch (error) {
             console.error('删除模块时发生错误:', error);
             Message.error('删除模块时发生错误,请重试!');

+ 1 - 1
src/views/template/page/pageList.vue

@@ -77,7 +77,7 @@ import headSector from '../style/sector/head/1200x200/1.vue';
 //一级菜单导肮
 import menuSector from '../style/sector/menu/1200x130/1.vue';
 //频道菜单
-import channelMenu from '../style/sector/body/class/menu/1200x100/1.vue';
+import channelMenu from '../style/sector/body/list/menu/1200x100/1.vue';
 //列表页是固定的
 import fixedListSector from '../style/sector/body/list/list/1200x1220/1.vue';
 //底部

+ 1 - 1
src/views/template/style/sector/body/class/menu/1200x100/1.vue

@@ -62,7 +62,7 @@ export default {
         
     },
     mounted() {
-        
+
     },
 };
 </script>

+ 89 - 0
src/views/template/style/sector/body/list/menu/1200x100/1.vue

@@ -0,0 +1,89 @@
+<template>
+    <div class="channelMenuBox">
+        <div :class="['channelMenuSector', {buildingBorder: this.$store.state.template.previewStatus==false}]">
+            <convertBtn :id="id" :dataSort="dataSort" :sort="0" :type="12"/>
+            <div v-if="this.$store.state.template.pageData.list[dataSort].content.componentList[0].component_style == 1">
+                <menu1Style/>
+            </div>
+            <div v-if="this.$store.state.template.pageData.list[dataSort].content.componentList[0].component_style == 2">
+                <menu2Style/>
+            </div>
+            <div v-if="this.$store.state.template.pageData.list[dataSort].content.componentList[0].component_style > 2">
+                <atWork :dataStyle="2" :dataWidth="1200" :dataHeight="100" />
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+//编辑按钮
+import editBtn from '../../../../../../public/editBtn.vue'
+import convertBtn from '../../../../../../public/convertBtn.vue'
+//1200x100
+import menu1Style from '../../../../../../style/components/menu/1200x100/1.vue'
+import menu2Style from '../../../../../../style/components/menu/1200x100/2.vue'
+//组件研发中
+import atWork from '../../../../../../public/atWork.vue'
+export default {
+    components: {
+        editBtn,
+        convertBtn,
+        menu1Style,
+        menu2Style,
+        atWork
+    },
+    props: {
+        id:{
+            type:Number,
+            default:0
+        },
+        y:{
+            type:Number,
+            default:0
+        },
+        dataSort:{
+            type:Number,
+            default:0
+        }
+    },
+    data() {
+        return {
+            leftData:{
+                text:0,
+                img:3
+            },
+            rightData:{
+                text:9,
+                img:0
+            }
+        };
+    },
+    methods: {
+        
+    },
+    mounted() {
+
+    },
+};
+</script>
+
+<style scoped lang="less">
+.buildingBorder {
+    border: 2px dashed #999;
+}
+.channelMenuBox {
+    width: 100%;
+    height: 100px;
+    box-sizing: content-box;
+    .channelMenuSector {
+        width: 1200px;
+        height: 100px;
+        margin: 0 auto;
+        position: relative;
+        .templateEditBtnBox {
+            right: 0;
+        }
+    }
+}
+</style>
+

+ 1 - 1
src/views/template/templateStyle.vue

@@ -38,7 +38,7 @@
             <tableTitle :name="tableDivTitle" />
             <div class="templateStyleBox">
                 <div class="templateStyleItem" v-for="(item, index) in tableData" :key="index">
-                    <div :class="['templateStyleItemBox', { active: item.status == 1 || item.id == userTemplateId }]" @click="useIt(item)">
+                    <div :class="['templateStyleItemBox', { active: item.status == 1 || item.template_id == userTemplateId }]" @click="useIt(item)">
                         <img :src="item.template_img[0].url">
                         <div class="templateStyleItemTitle">{{ item.template_name }}</div>
                     </div>