|
@@ -65,7 +65,10 @@ Page({
|
|
onReachBottom: function () {
|
|
onReachBottom: function () {
|
|
if (this.data.hasNextPage) {
|
|
if (this.data.hasNextPage) {
|
|
let pn = this.data.pageNum
|
|
let pn = this.data.pageNum
|
|
- this.setData({ loading: '加载中', 'pageNum': ++pn })
|
|
|
|
|
|
+ this.setData({
|
|
|
|
+ loading: '加载中',
|
|
|
|
+ 'pageNum': ++pn
|
|
|
|
+ })
|
|
this.queryList()
|
|
this.queryList()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -79,7 +82,10 @@ Page({
|
|
queryList: function () {
|
|
queryList: function () {
|
|
const urls = urlDef.urls;
|
|
const urls = urlDef.urls;
|
|
let stu = wx.getStorageSync('student')
|
|
let stu = wx.getStorageSync('student')
|
|
- let params = { 'q.studentId': stu.studentId, 'q.orgId': stu.orgId }
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ 'q.studentId': stu.studentId,
|
|
|
|
+ 'q.orgId': stu.orgId
|
|
|
|
+ }
|
|
params.pageNum = this.data.pageNum
|
|
params.pageNum = this.data.pageNum
|
|
util.apiPost(urls.get_course_report, params).then(rs => {
|
|
util.apiPost(urls.get_course_report, params).then(rs => {
|
|
let list = rs.list
|
|
let list = rs.list
|
|
@@ -95,6 +101,23 @@ Page({
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ if (this.data.courseItems.length <= 0) {
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '暂无数据',
|
|
|
|
+ showCancel: false, //是否显示取消按钮
|
|
|
|
+ cancelText: "否", //默认是“取消”
|
|
|
|
+ cancelColor: '#999999', //取消文字的颜色
|
|
|
|
+ confirmText: "确定", //默认是“确定”
|
|
|
|
+ confirmColor: 'skyblue', //确定文字的颜色
|
|
|
|
+ success(){
|
|
|
|
+ wx.navigateBack({
|
|
|
|
+ delta: -1,
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
this.setData({
|
|
this.setData({
|
|
'hasNextPage': rs.hasNextPage,
|
|
'hasNextPage': rs.hasNextPage,
|
|
'loading': rs.hasNextPage ? '下拉刷新' : '没有更多数据',
|
|
'loading': rs.hasNextPage ? '下拉刷新' : '没有更多数据',
|