Browse Source

03/14 17:38

11
261568008@qq.com 5 years ago
parent
commit
d458711c7f

File diff suppressed because it is too large
+ 0 - 0
dist/css/ManageEvaluation.190055c1.css


File diff suppressed because it is too large
+ 0 - 0
dist/css/ManageEvaluation.3bbe6f2f.css


File diff suppressed because it is too large
+ 0 - 0
dist/index.html


File diff suppressed because it is too large
+ 0 - 0
dist/js/ManageEvaluation.4d14b01e.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/ManageEvaluation.824c4cec.js


File diff suppressed because it is too large
+ 0 - 0
dist/js/app.fc4f2f08.js


+ 22 - 14
src/views/audition/ManageEvaluation.vue

@@ -58,8 +58,8 @@
       </van-dropdown-menu>
     </div>
     <!--  -->
-    <div id='list-content'>
-       <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+
+    <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
       <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getList">
         <van-cell
           v-for="(item,index) in courseList"
@@ -89,8 +89,7 @@
         </van-cell>
       </van-list>
     </van-pull-refresh>
-    </div>
-   
+
     <!--  -->
     <!-- <m-empty class="empty" v-else key="data" /> -->
 
@@ -166,9 +165,6 @@ export default {
     }
   },
   mounted() {
-    let winHeight = document.documentElement.clientHeight; //视口大小
-    document.getElementById("list-content").style.height =
-      winHeight - 80 + "px";
     this.dateSection.currentDate = new Date();
     this.dateSection.showStartDate = this.timeFormat(
       this.dateSection.currentDate
@@ -234,7 +230,7 @@ export default {
       this.$refs.item.toggle();
     },
     getList() {
-      console.log("调用了");
+      this.page++;
       this.search.startTime =
         this.dateSection.showStartDate.replace(/\//g, "-") + " 00:00:00";
       (this.search.endTime =
@@ -242,21 +238,32 @@ export default {
         (this.search.page = this.page);
       this.loading = true;
       getPracticeGroup(this.search).then(res => {
+          console.log(res.data.code)
         if (res.data.code == 200) {
-          this.page++;
+          if (this.refreshing) {
+            this.courseList = [];
+            this.refreshing = false;
+          }
+
+          if (res.data.data.rows.length == 0) {
+          
+            this.finished = true;
+          }
           if (this.courseList.length > 0) {
             this.courseList = this.courseList.concat(res.data.data.rows);
           } else {
             this.courseList = res.data.data.rows;
           }
-
-          this.loading = false;
-          if (res.data.data.rows.length == 0) {
+          if (this.courseList.length >= 20) {
             this.finished = true;
           }
-          this.refreshing = false;
-        } else {
+
           this.loading = false;
+
+          this.refreshing = true;
+        } else {
+          this.finished = true;
+           this.loading = false;
           this.refreshing = false;
         }
       });
@@ -289,6 +296,7 @@ export default {
 @import url("../../assets/commonLess/variable.less");
 .wrap {
   min-height: 100vh;
+  overflow-y: auto;
 }
 #list-content {
   background-color: #fff;

Some files were not shown because too many files changed in this diff