diff --git a/HSLink-app/pages/tabbar/homepage/homepage.vue b/HSLink-app/pages/tabbar/homepage/homepage.vue index dfe57b7..b780e1f 100644 --- a/HSLink-app/pages/tabbar/homepage/homepage.vue +++ b/HSLink-app/pages/tabbar/homepage/homepage.vue @@ -77,6 +77,9 @@ export default { onShow() { this.getAllData(); }, + onPullDownRefresh () { + this.getAllData(); + }, methods: { /** * 跳转详情页面 @@ -104,6 +107,7 @@ export default { this.$set(item,'type','学生想法'); }) this.noticeList = (res.data.parentAdvice.concat(res.data.schoolNoticeList, res.data.studentThinking)).sort(sortBy("release_time",false)); + uni.startPullDownRefresh(); this.noData = this.noticeList.length === 0 ? true : false; console.log("首页数据",this.noticeList); },err=>{ diff --git a/HSLink-app/pages/tabbar/message/message.vue b/HSLink-app/pages/tabbar/message/message.vue index c6a2d4f..06edb7a 100644 --- a/HSLink-app/pages/tabbar/message/message.vue +++ b/HSLink-app/pages/tabbar/message/message.vue @@ -42,6 +42,9 @@ onShow() { this.getPersonalPrivateLetter(); }, + onPullDownRefresh () { + this.getPersonalPrivateLetter(); + }, methods: { /** * 跳转到消息页面 @@ -85,6 +88,7 @@ this.message.splice(index,1); } }); + uni.startPullDownRefresh(); console.log("私信",res); },err=>{ console.log("err",err); diff --git a/HSLink-app/pages/tabbar/my/my-article/my-article.vue b/HSLink-app/pages/tabbar/my/my-article/my-article.vue index 653b084..facc985 100644 --- a/HSLink-app/pages/tabbar/my/my-article/my-article.vue +++ b/HSLink-app/pages/tabbar/my/my-article/my-article.vue @@ -83,6 +83,9 @@ export default { onShow() { this.getAllData(); }, + onPullDownRefresh () { + this.getAllData(); + }, methods: { /** * 编辑页面 @@ -114,6 +117,7 @@ export default { }).then(res=>{ console.log("我的文章",res); this.noticeList = res.data; + uni.startPullDownRefresh(); this.noData = this.noticeList.length === 0 ? true : false; },err=>{ console.log("err",err); diff --git a/HSLink-app/util/request.js b/HSLink-app/util/request.js index e28da5d..248cb2a 100644 --- a/HSLink-app/util/request.js +++ b/HSLink-app/util/request.js @@ -1,5 +1,5 @@ -const baseUrl = 'http://192.168.10.29:8048'; //服务器地址 +const baseUrl = 'http://106.53.113.158:8048'; //服务器地址 const get = (url, data) => { let httpDefaultOpts = {