提交 b228ece9 编写于 作者: R Renic1

下拉刷新和返回刷新发现模块

上级 a65ca9f0
......@@ -83,7 +83,8 @@
}, {
"path": "pages/discover/main",
"style": {
"navigationStyle": "custom"
"navigationStyle": "custom",
"enablePullDownRefresh":true
}
}, {
"path": "pages/discover/discover-detail",
......
......@@ -70,6 +70,12 @@
title:'趣味篮球赛'
}
},
onPullDownRefresh(){
//刷新后的效果
console.log("1111");
this.onLoad1();
uni.stopPullDownRefresh();
},
mounted() {
// 根据id值进行判断
if (this.id == 1) {
......@@ -116,6 +122,14 @@
this.activityList1=res.result.data.activityList,
console.log(this.activityList1);
});
},
onLoad1() {
let type =getApp().globalData.type;
if(type=="644a64c228064a7587cd79bf") this.id=2;
else this.id=1;
if(this.id==1) this.teacherId=getApp().globalData.userId;
this.getData();
this.getData1();
}
......@@ -127,6 +141,9 @@
if(this.id==1) this.teacherId=getApp().globalData.userId;
this.getData();
this.getData1();
},
onShow() {
this.onLoad1();
}
}
</script>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册