瀏覽代碼

修复首页复用模板视频上传

ming 1 年之前
父節點
當前提交
e8a9f3e242
共有 3 個文件被更改,包括 11 次插入22 次删除
  1. 9 20
      assets/js/commonVue.js
  2. 1 1
      template3/index.html
  3. 1 1
      template4/index.html

+ 9 - 20
assets/js/commonVue.js

@@ -183,15 +183,7 @@ const App = {
             _this.requestParams.categoryid = objData[0].id
             _this.getArticalData(_this.requestParams)
             _this.columnImage = _this.columnList[i].imagePath;
-
-
-          setTimeout(() => {
-            if (_this.modelType == 2) {
-              document.getElementById("videoPlay").src = _this.columnImage; //url为你需要播放的视频地址
-              document.getElementById("videoPlay").setAttribute('poster', '/assets/img/banner/poster.jpg');
-            }
-          }, 100)
-          _this.getArticalData(_this.requestParams)
+            _this.getArticalData(_this.requestParams)
 
 
           }
@@ -199,21 +191,18 @@ const App = {
             console.log('首页模板')
             getSeoCommon()
             this.requestParams.categoryid = this.columnList[0].id
-            _this.modelType = _this.columnList[0].modelType;
             _this.columnImage = _this.columnList[0].imagePath;
-            setTimeout(() => {
-              if (_this.modelType == 2) {
-                document.getElementById("videoPlay").src = _this.columnImage; //url为你需要播放的视频地址
-                document.getElementById("videoPlay").setAttribute('poster', '/assets/img/banner/poster.jpg');
-              }
-            }, 100)
+          
             _this.getArticalData(_this.requestParams)
           }
-         
-         
-        
 
-          
+          _this.modelType = _this.columnList[i].modelType;
+          setTimeout(() => {
+            if (_this.modelType == 2) {
+              document.getElementById("videoPlay").src = _this.columnImage; //url为你需要播放的视频地址
+              document.getElementById("videoPlay").setAttribute('poster', '/assets/img/banner/poster.jpg');
+            }
+          }, 100)
         }
 
 

+ 1 - 1
template3/index.html

@@ -108,7 +108,7 @@
                         </div>
                     </div>
     
-                    <div class="news-content-section pt-60">
+                    <div class="news-content-section pt-60" v-if="totalPageSzie">
                         <div class="container">
                             <div class="row newBox">
                                 <div class="col-lg-12 col-md-12 content" >

+ 1 - 1
template4/index.html

@@ -113,7 +113,7 @@
                                 </div>
                             </ul>
         
-                            <div v-if="!loading" class="page mt-30 mb-30">
+                            <div v-if="!loading&&totalPageSzie" class="page mt-30 mb-30">
                                 <div class="d-flex justify-content-center align-items-end cannot_selected"
                                     style="position:relative">
                                     <div class="page-des align-items-start cannot_selected">共<span> {{