|
@@ -239,28 +239,43 @@ export default {
|
|
|
this.dateEndSection.showEndDate.replace(/\//g, "-") + " 23:59:59"),
|
|
|
(this.search.page = this.page);
|
|
|
this.search.rows = 20;
|
|
|
- this.page++;
|
|
|
+ // this.page++;
|
|
|
getPracticeGroup(this.search).then(res => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- this.loading = false;
|
|
|
- if (res.data.data.rows.length < 10) {
|
|
|
- this.finished = true;
|
|
|
- }
|
|
|
- if (this.courseList.length > 0) {
|
|
|
- this.courseList = this.courseList.concat(res.data.data.rows);
|
|
|
- console.log('拼接')
|
|
|
- } else {
|
|
|
- this.courseList = res.data.data.rows;
|
|
|
- console.log('赋值')
|
|
|
- }
|
|
|
- console.log(this.courseList)
|
|
|
-
|
|
|
- this.refreshing = false;
|
|
|
+ let result = res.data
|
|
|
+ this.loading = false
|
|
|
+ if(result.code == 200) {
|
|
|
+ this.page = result.data.pageNo
|
|
|
+ this.courseList = this.courseList.concat(result.data.rows)
|
|
|
+ if(this.page >= result.data.totalPage) {
|
|
|
+ this.finished = true
|
|
|
+ }
|
|
|
+ this.page++
|
|
|
} else {
|
|
|
- this.finished = true;
|
|
|
- this.loading = false;
|
|
|
- this.refreshing = false;
|
|
|
+ this.finished = true
|
|
|
}
|
|
|
+ // 判断是否有数据
|
|
|
+ // if(this.dataList.length <= 0) {
|
|
|
+ // this.dataShow = false
|
|
|
+ // }
|
|
|
+
|
|
|
+
|
|
|
+ // if (res.data.code == 200) {
|
|
|
+ // this.loading = false;
|
|
|
+ // if (res.data.data.rows.length < 10) {
|
|
|
+ // 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.refreshing = false;
|
|
|
+ // } else {
|
|
|
+ // this.finished = true;
|
|
|
+ // this.loading = false;
|
|
|
+ // this.refreshing = false;
|
|
|
+ // }
|
|
|
});
|
|
|
},
|
|
|
onRefresh() {
|