|
| xqd
@@ -110,16 +110,35 @@
|
|
|
watch: {
|
|
|
|
|
|
},
|
|
|
- async onLoad() {
|
|
|
- // console.log('111111111111111111111111111111111111111');
|
|
|
- // http("wechat.test", {
|
|
|
+ async onPullDownRefresh() {
|
|
|
+ // uni.reLaunch({
|
|
|
+ // url: '/pages/index/index'
|
|
|
+ // })
|
|
|
+ let ress = await taskList({
|
|
|
+ is_new: 1,
|
|
|
+ page: this.page,
|
|
|
+ per_page: this.pagesize
|
|
|
+ })
|
|
|
+ if (ress.code == 0) {
|
|
|
+ this.totalElements = ress.data.total
|
|
|
+ this.tuskList = ress.data.data
|
|
|
+ }
|
|
|
+ // console.log('课程学习页任务列表返回值', ress);
|
|
|
|
|
|
- // }).then(res => {
|
|
|
|
|
|
- // console.log('利用原请求封装轮播图返回值', res);
|
|
|
- // })
|
|
|
|
|
|
+ let ress1 = await courseList()
|
|
|
+ if (ress1.code == 0) {
|
|
|
+ this.courseList = ress1.data.data
|
|
|
+ }
|
|
|
+ // console.log('课程学习页课程列表返回值', ress1);
|
|
|
|
|
|
+ if (ress.code == 0 && ress1.code == 0) {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async onLoad() {
|
|
|
if (!uni.getStorageSync('token')) {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/user/signin'
|
|
| xqd
@@ -143,6 +162,10 @@
|
|
|
this.courseList = ress1.data.data
|
|
|
}
|
|
|
console.log('课程学习页课程列表返回值', ress1);
|
|
|
+
|
|
|
+ if (ress.code == 0 && ress1.code == 0) {
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ }
|
|
|
},
|
|
|
async onReachBottom() {
|
|
|
let allTotal = this.page * this.pagesize
|