|
@@ -58,8 +58,9 @@
|
|
|
</van-dropdown-menu>
|
|
|
</div>
|
|
|
<!-- -->
|
|
|
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
- <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getList" style="min-height: 80vh; background:#fff;">
|
|
|
+ <div id='list-content'>
|
|
|
+ <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"
|
|
|
:key="index"
|
|
@@ -88,6 +89,8 @@
|
|
|
</van-cell>
|
|
|
</van-list>
|
|
|
</van-pull-refresh>
|
|
|
+ </div>
|
|
|
+
|
|
|
<!-- -->
|
|
|
<!-- <m-empty class="empty" v-else key="data" /> -->
|
|
|
|
|
@@ -127,7 +130,7 @@ export default {
|
|
|
components: { MEmpty },
|
|
|
data() {
|
|
|
return {
|
|
|
- str:'2020-01-23 12:12:12',
|
|
|
+ str: "2020-01-23 12:12:12",
|
|
|
dateSection: {
|
|
|
status: false,
|
|
|
minDate: new Date(2020, 0, 1),
|
|
@@ -152,7 +155,7 @@ export default {
|
|
|
loading: false,
|
|
|
finished: false,
|
|
|
refreshing: false,
|
|
|
- page:1
|
|
|
+ page: 1
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -163,6 +166,9 @@ 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
|
|
@@ -228,30 +234,30 @@ export default {
|
|
|
this.$refs.item.toggle();
|
|
|
},
|
|
|
getList() {
|
|
|
- console.log('调用了')
|
|
|
+ console.log("调用了");
|
|
|
this.search.startTime =
|
|
|
this.dateSection.showStartDate.replace(/\//g, "-") + " 00:00:00";
|
|
|
(this.search.endTime =
|
|
|
this.dateEndSection.showEndDate.replace(/\//g, "-") + " 23:59:59"),
|
|
|
- this.search.page=this.page;
|
|
|
+ (this.search.page = this.page);
|
|
|
this.loading = true;
|
|
|
getPracticeGroup(this.search).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- this.page++
|
|
|
- if( this.courseList.length >0){
|
|
|
- this.courseList = this.courseList.concat(res.data.data.rows)
|
|
|
- }else {
|
|
|
- this.courseList = res.data.data.rows;
|
|
|
+ this.page++;
|
|
|
+ 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){
|
|
|
- this.finished = true;
|
|
|
+ if (res.data.data.rows.length == 0) {
|
|
|
+ this.finished = true;
|
|
|
}
|
|
|
- this.refreshing = true;
|
|
|
- }else {
|
|
|
- this.loading = false;
|
|
|
- this.refreshing = true;
|
|
|
+ this.refreshing = false;
|
|
|
+ } else {
|
|
|
+ this.loading = false;
|
|
|
+ this.refreshing = false;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -262,7 +268,7 @@ export default {
|
|
|
// 重新加载数据
|
|
|
// 将 loading 设置为 true,表示处于加载状态
|
|
|
this.loading = true;
|
|
|
- this.courseList = [];
|
|
|
+ this.courseList = [];
|
|
|
this.getList();
|
|
|
},
|
|
|
submitReview(item) {
|
|
@@ -272,18 +278,21 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- filters:{
|
|
|
- filterClass (val) {
|
|
|
- return val.substring(0,10)
|
|
|
+ filters: {
|
|
|
+ filterClass(val) {
|
|
|
+ return val.substring(0, 10);
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
@import url("../../assets/commonLess/variable.less");
|
|
|
-.wrap{
|
|
|
+.wrap {
|
|
|
min-height: 100vh;
|
|
|
}
|
|
|
+#list-content {
|
|
|
+ background-color: #fff;
|
|
|
+}
|
|
|
.searchSection {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|