|
@@ -73,21 +73,50 @@
|
|
|
list:[],
|
|
|
list1:[],
|
|
|
recordList:[],
|
|
|
- goodsData:{}
|
|
|
+ goodsData:{},
|
|
|
+ param:{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10
|
|
|
+ },
|
|
|
+ total:0
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
this.listGoodsUserQuestion();
|
|
|
this.examaperList();
|
|
|
+ this.getExamRecordList()
|
|
|
|
|
|
- this.$api.examRecordList({}).then(res => {
|
|
|
- this.recordList = res.data.rows
|
|
|
- })
|
|
|
+ },
|
|
|
+ onPullDownRefresh(){
|
|
|
+ let that = this
|
|
|
+ this.param = {
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:10
|
|
|
+ }
|
|
|
+ this.getExamRecordList()
|
|
|
+ setTimeout(function(){
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ },500)
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (this.recordList.length < this.total) {
|
|
|
+ this.param.pageNum++
|
|
|
+ this.getExamRecordList()
|
|
|
+ }
|
|
|
},
|
|
|
onShow(){
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ getExamRecordList(){
|
|
|
+ if(this.param.pageNum==1){
|
|
|
+ this.recordList = []
|
|
|
+ }
|
|
|
+ this.$api.examRecordList(this.param).then(res => {
|
|
|
+ this.recordList.push.apply(this.recordList,res.data.rows)
|
|
|
+ this.total = res.data.total
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* 去做题
|
|
|
*/
|
|
@@ -136,19 +165,15 @@
|
|
|
},
|
|
|
testClick(item) {
|
|
|
this.index = 0
|
|
|
- this.$api.examRecordList({
|
|
|
- goodsId:item.goodsId
|
|
|
- }).then(res => {
|
|
|
- this.recordList = res.data.rows
|
|
|
- })
|
|
|
+ this.param.goodsId = item.goodsId
|
|
|
+ this.param.pageNum = 1
|
|
|
+ this.getExamRecordList()
|
|
|
},
|
|
|
paperClick(item) {
|
|
|
this.index = 0
|
|
|
- this.$api.examRecordList({
|
|
|
- paperId:item.paperId
|
|
|
- }).then(res => {
|
|
|
- this.recordList = res.data.rows
|
|
|
- })
|
|
|
+ this.param.paperId = item.paperId
|
|
|
+ this.param.pageNum = 1
|
|
|
+ this.getExamRecordList()
|
|
|
},
|
|
|
tab(e) {
|
|
|
this.index = e.currentTarget.dataset.index;
|