|
@@ -24,7 +24,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
goodsId: 0,
|
|
|
- courseList: []
|
|
|
+ courseList: [],
|
|
|
+ param:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+
|
|
|
};
|
|
|
},
|
|
|
onLoad(option) {
|
|
@@ -33,6 +39,12 @@ export default {
|
|
|
this.courseCourseList();
|
|
|
},
|
|
|
onShow() {},
|
|
|
+ onReachBottom() {
|
|
|
+ if (this.courseList.length < this.param.total) {
|
|
|
+ this.param.pageNum++;
|
|
|
+ this.courseCourseList();
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
jump(item) {
|
|
|
this.$navTo.togo('/pages2/class/detail', {
|
|
@@ -49,9 +61,11 @@ export default {
|
|
|
},
|
|
|
courseCourseList() {
|
|
|
let self = this;
|
|
|
- this.$api.courseCourseList({ goodsId: this.goodsId }).then(res => {
|
|
|
+ this.param.goodsId =this.goodsId
|
|
|
+ this.$api.courseCourseList(this.param).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- self.courseList = res.data.rows;
|
|
|
+ self.courseList.push.apply(self.courseList, res.data.rows);
|
|
|
+ self.param.total = res.data.total;
|
|
|
}
|
|
|
});
|
|
|
},
|