Explorar o código

自助建站紧急修正:重置选择的皮肤

自助建站紧急修正:重置选择的皮肤
dangyunlong hai 4 días
pai
achega
fb72ab6d4e
Modificáronse 2 ficheiros con 13 adicións e 8 borrados
  1. 2 2
      src/views/template/templateList.vue
  2. 11 6
      src/views/template/templateStyle.vue

+ 2 - 2
src/views/template/templateList.vue

@@ -169,8 +169,8 @@ export default {
                 if (item.page_type[idx] == "3") {item.page_type[idx] = "列表页"}
                 if (item.page_type[idx] == "4") {item.page_type[idx] = "详情页"}
                 if (item.page_type[idx] == "5") {item.page_type[idx] = "搜索页"}
-                if (item.page_type[idx] == "6") {item.page_type[idx] = "单页列表"}
-                if (item.page_type[idx] == "7") {item.page_type[idx] = "单页详情"}
+                if (item.page_type[idx] == "6") {item.page_type[idx] = "单页列表"}
+                if (item.page_type[idx] == "7") {item.page_type[idx] = "单页详情"}
               }
               // 将数组转换为字符串,并去掉两端的 [ 和 ]
               item.page_type = item.page_type.join(", ");

+ 11 - 6
src/views/template/templateStyle.vue

@@ -18,15 +18,15 @@
                             </el-select>
                         </div>
                     </el-col>
-                    <el-col :span="8">
+                    <!-- <el-col :span="8">
                         <div class="searchBox">
                             <div class="searchTitle">按关键字搜索</div>
                             <el-input v-model="getApiData.keyword[0]" placeholder="根据描述推荐皮肤"></el-input>
                         </div>
-                    </el-col>
-                    <el-col :span="8">
+                    </el-col> -->
+                    <el-col :span="16">
                         <div class="searchBtnBox">
-                            <el-button type="primary" @click="reset">重置</el-button>
+                            <el-button type="default" @click="reset">重置</el-button>
                             <el-button type="primary" @click="getData('search')">搜索</el-button>
                         </div>
                     </el-col>
@@ -37,7 +37,7 @@
         <!--表格内容 start------------------------------------------------------------>
         <div class="layerBox">
             <tableTitle :name="tableDivTitle" />
-            <div class="templateStyleBox">
+            <div class="templateStyleBox" v-if="tableData.length != 0">
                 <div class="templateStyleItem" v-for="(item, index) in tableData" :key="index">
                     <div :class="['templateStyleItemBox', { active: item.status == 1 || item.template_id == userTemplateId }]" @click="useIt(item)">
                         <img :src="item.template_img[0].url">
@@ -45,7 +45,10 @@
                     </div>
                 </div>
             </div>
-            <div class="paginationBox">
+            <div class="thumbnailItem" v-else>
+                <p class="notData">该风格下暂无皮肤</p>
+            </div>
+            <div class="paginationBox" v-if="tableData.length != 0">
                 <el-pagination 
                     @size-change="handleSizeChange" 
                     :current-page="getApiData.page"
@@ -182,6 +185,8 @@ export default {
                     this.tableData = data;
                     //总条数
                     this.allCount = res.data.template.total;
+
+                    this.userData = [];
                     //标记用户之前的选择
                     if(res.data.template_id==0||res.data.template_id==null){
                         console.log("用户从未选择过皮肤!")