http请求修改

This commit is contained in:
姚亚男
2021-10-19 14:59:13 +08:00
parent b399125d3a
commit 27a0dc96b1
10 changed files with 113 additions and 74 deletions
+10
View File
@@ -33,6 +33,10 @@ Page({
}
},
loadData(){
wx.showToast({
title: '加载中...',
icon: 'loading'
})
UserApi.messageList(this.data.searchParams).then(res=>{
if(res.success){
// 搜索时,把原数据清空,重新筛选
@@ -56,6 +60,12 @@ Page({
})
}
}
}).catch(err => {
wx.showToast({
title: '加载失败',
icon: 'fail',
duration: 2000
})
})
},
// 点击首页的五个选项跳转页面