瀏覽代碼

切换皮肤的逻辑开发

切换皮肤的逻辑开发
dangyunlong 14 小時之前
父節點
當前提交
b6ec9f9c1f

+ 2 - 2
src/api/template.js

@@ -57,9 +57,9 @@ export function getWebsiteTemplateList(data) {
 }
 
 //1.7 保存用户选择的模板
-export function addWebsiteTemplateclassintel(data) {
+export function chooseWebsiteTemplate(data) {
   return request({
-    url: '/website/addWebsiteTemplateclassintel',
+    url: '/public/chooseWebsiteTemplate',
     method: 'post',
     data
   })

+ 4 - 2
src/layout/components/template/pages/about/sectorArticle.vue

@@ -6,7 +6,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -16,7 +17,8 @@
             @dragend="dragend('aboutArticleSector', 115, aboutArticleSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750746198879072.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750746198879072.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750831385586584.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通用型单页详情</div>
         </div>

+ 4 - 2
src/layout/components/template/pages/about/sectorList.vue

@@ -6,7 +6,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -16,7 +17,8 @@
             @dragend="dragend('aboutListSector', 132, aboutListSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750746179192707.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750746179192707.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750831329194215.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通用型单页列表</div>
         </div>

+ 4 - 2
src/layout/components/template/pages/article/sector.vue

@@ -7,7 +7,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -18,7 +19,8 @@
             @dragend="dragend('articleSector', 161, articleSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250623/1750667986738371.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250623/1750667986738371.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750829165556967.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通用型文章详情</div>
         </div>

+ 12 - 6
src/layout/components/template/pages/class/sector.vue

@@ -7,7 +7,8 @@
             @dragend="dragend('channelMenu', 13, channelMenu)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250619/1750311785239902.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250619/1750311785239902.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820605601502.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">子导航菜单</div>
         </div>
@@ -18,7 +19,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -29,7 +31,8 @@
             @dragend="dragend('scrollTextSector', 44, scrollTextSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250619/1750312139660006.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250619/1750312139660006.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820773336300.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">滚动图文组合</div>
         </div>
@@ -40,7 +43,8 @@
             @dragend="dragend('manyPictureSector', 47, manyPictureSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250605/1749085058737998.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250605/1749085058737998.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820905439306.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合1</div>
         </div>
@@ -50,7 +54,8 @@
             @drag="drag('commentSector', 47, commentSector)" 
             @dragend="dragend('commentSector', 47, commentSector)">
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749170683104422.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749170683104422.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820973808775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合2</div>
         </div>
@@ -61,7 +66,8 @@
             @dragend="dragend('listSector', 98, listSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749200397579402.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749200397579402.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750822186600939.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合3</div>
         </div>

+ 14 - 7
src/layout/components/template/pages/index/sector.vue

@@ -7,7 +7,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -18,7 +19,8 @@
             @dragend="dragend('headLineSector', 17, headLineSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250603/1748914467583559.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250603/1748914467583559.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750819803899738.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">网站头条</div>
         </div>
@@ -29,7 +31,8 @@
             @dragend="dragend('bannerSector', 44, bannerSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/174899892158949.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/174899892158949.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750819938475436.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">焦点图</div>
         </div>
@@ -40,7 +43,8 @@
             @dragend="dragend('manyPictureSector', 47, manyPictureSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250605/1749085058737998.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250605/1749085058737998.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820111536544.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合1</div>
         </div>
@@ -50,7 +54,8 @@
             @drag="drag('commentSector', 47, commentSector)" 
             @dragend="dragend('commentSector', 47, commentSector)">
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749170683104422.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749170683104422.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/175082020060857.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合2</div>
         </div>
@@ -61,7 +66,8 @@
             @dragend="dragend('listSector', 98, listSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749200397579402.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250606/1749200397579402.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820339495190.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">新闻图文组合3</div>
         </div>
@@ -72,7 +78,8 @@
             @dragend="dragend('onlyImgSector', 51, onlyImgSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250609/1749451127220319.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250609/1749451127220319.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750820413450978.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">带广告新闻组合</div>
         </div>

+ 4 - 2
src/layout/components/template/pages/list/sector.vue

@@ -6,7 +6,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -16,7 +17,8 @@
             @dragend="dragend('fixedListSector', 125, fixedListSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250623/1750646777377058.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250623/1750646777377058.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750829474588252.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通用型文章列表</div>
         </div>

+ 4 - 2
src/layout/components/template/pages/search/sector.vue

@@ -6,7 +6,8 @@
             @dragend="dragend('adSector', 12, adSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/png/20250604/1748998088187321.png" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通栏广告</div>
         </div>
@@ -16,7 +17,8 @@
             @dragend="dragend('searchListSector', 133, searchListSector)"
         >
             <div class="sectorItem">
-                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750727451366122.jpg" />
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250624/1750727451366122.jpg" v-if="this.$store.state.template.editWebsiteClass==1"/>
+                <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750829776880227.jpg" v-if="this.$store.state.template.editWebsiteClass==2"/>
             </div>
             <div class="sectorItemTitle">通用型搜索列表</div>
         </div>

+ 36 - 24
src/store/modules/template.js

@@ -2,7 +2,7 @@
 import { getSiteInfo, getSiteCategory, getFooterCategoryList} from '@/api/cms'
 import {
     getWebsiteintel, checkWebsiteBuild, getAdminSiteInfo, upWebsiteTemplateintel, getAllTemplateClass, 
-    getWebsiteTemplateList, addWebsiteTemplateclassintel, getWebsiteTemplateclassintel, saveWebsiteTemplate, 
+    getWebsiteTemplateList, chooseWebsiteTemplate, getWebsiteTemplateclassintel, saveWebsiteTemplate, 
     getWebsiteTemplateInfo, getWebsiteTemplateData, getAdminWebsiteFootAll, addTwinAdPlace, 
     getWebPageType, addWebPageType, checkWebsiteEdit, getWebsiteTemplate
 } from '@/api/template'
@@ -850,29 +850,41 @@ const mutations = {
     },
     //回显模板内容
     setWebsiteTemplate(state, data) {
+        //每次进入的时候先清理再回显
+        //清理state.webSiteData
+        Vue.set(state.webSiteData, 'template', {
+            index: [],
+            class: [],
+            list: [],
+            article: [],
+            search: [],
+            aloneList: [],
+            aloneArticle: []
+        });
+        Vue.set(state, 'pageData', {
+            index: [],
+            class: [],
+            list: [],
+            article: [],
+            search: [],
+            aloneList: [],
+            aloneArticle: []
+        });
+        Vue.set(state.webSiteData.ad, 'top', {
+            "width": 830,//宽度
+            "height": 110,//高度
+            "name": "",//广告名称
+            "price": 0,//价格
+            "introduce":"",//介绍
+            "website_id": "",//网站id
+            "thumb": "https://img.bjzxtw.org.cn/pre/image/png/20250530/1748588901281358.png",//示例图 - 默认值
+            "typeid": 2,//广告类型 - 2 图片
+            "ad_tag": ""//广告标识 - 网站标识 + 页面名称 + sort
+        });
+        Vue.set(state, 'pageStatus', 1);
+
         if(data==null){
             console.log("第一次添加模板,无需回显!")
-            //清理state.webSiteData
-            Vue.set(state.webSiteData, 'template', {
-                index: [],
-                class: [],
-                list: [],
-                article: [],
-                search: [],
-                aloneList: [],
-                aloneArticle: []
-            });
-            Vue.set(state.webSiteData.ad, 'top', {
-                "width": 830,//宽度
-                "height": 110,//高度
-                "name": "",//广告名称
-                "price": 0,//价格
-                "introduce":"",//介绍
-                "website_id": "",//网站id
-                "thumb": "https://img.bjzxtw.org.cn/pre/image/png/20250530/1748588901281358.png",//示例图 - 默认值
-                "typeid": 2,//广告类型 - 2 图片
-                "ad_tag": ""//广告标识 - 网站标识 + 页面名称 + sort
-            });
         }else{
             console.log("编辑模板,开始回显模板内容!")
             console.log(data)
@@ -1107,9 +1119,9 @@ const actions = {
         })
     },
     //2.7 保存用户选择的风格
-    addWebsiteTemplateclassintel({ commit }, data) {
+    chooseWebsiteTemplate({ commit }, data) {
         return new Promise((resolve, reject) => {
-            addWebsiteTemplateclassintel(data).then(response => {
+            chooseWebsiteTemplate(data).then(response => {
                 resolve(response)
             }).catch(error => {
                 reject(error)

+ 2 - 2
src/styles/theme/foot/style2.less

@@ -55,7 +55,7 @@
     }
     .footerMenuBox {
         border-bottom: none;
-        background-color: #2F7ADD;
+        background-color: #A91B33;
         .footerMenu {
             width: 1200px;
             margin:0 auto;
@@ -69,7 +69,7 @@
                 font-weight: bold;
                 width: 200px;
                 text-align: center;
-                border-right: 1px solid #1962C3;
+                border-right: 1px solid #930F25;
                 &:last-child {
                     border-right: none;
                 }

+ 5 - 5
src/styles/theme/menu/style2.less

@@ -1,7 +1,7 @@
 .menuStyle2 {
     width: 100%;
     height: 130px;
-    background: #2F7ADD;
+    background: #A91B33;
     .componentBorder {
         border-left: 2px dashed #999;
         border-right: 2px dashed #999;
@@ -9,7 +9,7 @@
     .menuBoxBg {
         width: 1200px;
         height: 130px;
-        background: #2F7ADD;
+        background: #A91B33;
         margin: 0 auto;
         display: flex;
         align-items: center;
@@ -32,9 +32,9 @@
                 text-overflow: ellipsis;
                 text-align: center;
                 color: #fff;
-                background: #2F7ADD;
-                border-right: #1A63C4 1px solid;
-                border-left: #4C92EF 1px solid;
+                background: #A91B33;
+                border-right: #88172A 1px solid;
+                border-left: #DE3350 1px solid;
                 margin-bottom: 15px;
                 /* 当是第17个及以后的div时去掉margin-bottom */
                 &:nth-child(n+17) {

+ 1 - 1
src/views/template/public/step.vue

@@ -3,7 +3,7 @@
     <div class="stepBoxText" @click="hiddenStepStatus"><i class="el-icon-close"></i></div>
     <el-steps :active="activeNumber" align-center>
       <el-step title="填写模板基本信息" description="类型和网站底部信息" />
-      <el-step title="选择模板风格" description="网站整体风格和样式" />
+      <el-step title="选择模板皮肤" description="网站整体风格和样式" />
       <el-step title="构建模板模块" description="展示哪些模块到模板上" />
       <el-step title="应用网站模板" description="应用该模板到您的站点" />
     </el-steps>

+ 4 - 1
src/views/template/style/sector/head/1.vue

@@ -14,7 +14,10 @@
                 <img :src="this.$store.state.template.webSiteInfo.logo" class="logo">
                 <div :class="['headAdTopBox',{componentBorder: this.$store.state.template.previewStatus==false}]">
                     <editBtn :type="3" />
-                    <img src="http://img.bjzxtw.org.cn/pre/image/png/20250527/1748332370111555.png">
+                    <!--皮肤1-->
+                    <img src="http://img.bjzxtw.org.cn/pre/image/png/20250527/1748332370111555.png" v-if="this.$store.state.template.editWebsiteClass==1">
+                    <!--皮肤2-->
+                    <img src="http://img.bjzxtw.org.cn/pre/image/jpeg/20250625/1750817753245775.jpg" v-if="this.$store.state.template.editWebsiteClass==2">
                 </div>
             </div>
         </div>

+ 24 - 9
src/views/template/templateStyle.vue

@@ -58,7 +58,7 @@
         </div>
         <div class="layerBox">
             <tableTitle :name="useTemplateName" />
-            <div class="thumbnailBox">
+            <div class="thumbnailBox"  v-if="userData.length != 0">
                 <div class="thumbnailItem" @click="showImg(item.url)" v-for="item in userData">
                     <div class="thumbnailItemBox">
                         <img :src="item.url">
@@ -66,6 +66,9 @@
                     </div>
                 </div>
             </div>
+            <div class="thumbnailItem" v-else>
+                <p class="notData">暂未选择皮肤</p>
+            </div>
         </div>
         <!--步骤按钮 start------------------------------------------------------------>
         <div class="btnBox">
@@ -154,7 +157,7 @@ export default {
                 } else {
                     for (let item of res.data) {
                         let data = {};
-                        data.value = item.id
+                        data.value = item.class_id
                         data.label = item.name
                         this.allClass.push(data)
                     }
@@ -181,13 +184,14 @@ export default {
                     //标记用户之前的选择
                     if(res.data.template_id==0||res.data.template_id==null){
                         console.log("用户从未选择过皮肤!")
+                        this.userData = [];
                     }else{
                         this.userTemplateId = res.data.template_id;
                         for(let item of this.tableData){
-                            if(item.id == this.userTemplateId){
+                            if(item.template_id == this.userTemplateId){
                                 item.status = 1;
                                 this.userData = item.template_img;
-                                this.userTemplateId = item.id;
+                                this.userTemplateId = item.template_id;
                             }
                         }
                     }
@@ -203,7 +207,7 @@ export default {
             }
             item.status = 1;
             this.userData = item.template_img;
-            this.userTemplateId = item.id;
+            this.userTemplateId = item.template_id;
         },
         //1.4 列表内容分页
         //直接跳转
@@ -231,7 +235,7 @@ export default {
                 }
                 //console.log(this.userTemplateId)
                 //this.$route.query.website_id
-                this.$store.dispatch('template/addWebsiteTemplateclassintel', data).then(res => {
+                this.$store.dispatch('template/chooseWebsiteTemplate', data).then(res => {
                     if (res.code != 200) {
                         this.$message.error(res.message)
                     } else {
@@ -241,7 +245,7 @@ export default {
                             path: '/templateCreat',
                             query: {
                                 website_id: this.$route.query.website_id,
-                                style: 1
+                                style: this.userTemplateId
                             }
                         });
                     }
@@ -296,19 +300,30 @@ export default {
     text-align: center;
 }
 
+.notData {
+    line-height: 180px;
+    text-align: center;
+    height: 180px;
+    font-size: 30px;
+    color:#eee;
+    width: 100%;
+    font-weight: bold;
+    box-sizing: border-box;
+}
+
 .thumbnailBox {
     display: flex;
     align-items: center;
     flex-wrap: wrap;
     justify-content: flex-start;
-
+    
     .thumbnailItem {
         //width: 12.5%;
         width: 180px;
         height: 180px;
         text-align: center;
         padding: 0 10px 10px 10px;
-
+        
         .thumbnailItemBox {
             background: #ECEFFD;
             border-radius: 10px;