Commit 9db8d416 by 姜雷

Merge branch 'develop' into test

parents 19f4afc8 2ab422d4
...@@ -101,10 +101,15 @@ Component({ ...@@ -101,10 +101,15 @@ Component({
}); });
}, },
refreshList() { refreshList() {
wx.showLoading({
title: '加载中',
mask: true,
});
this.fetchList({ this.fetchList({
pageNum: 1, pageNum: 1,
}) })
.then(res => { .then(res => {
wx.hideLoading();
const { list } = res.data; const { list } = res.data;
this.setData({ this.setData({
pageNum: 1, pageNum: 1,
...@@ -112,14 +117,20 @@ Component({ ...@@ -112,14 +117,20 @@ Component({
}); });
}) })
.catch(err => { .catch(err => {
wx.hideLoading();
console.log(err); console.log(err);
}); });
}, },
getMoreListItem() { getMoreListItem() {
wx.showLoading({
title: '加载中',
mask: true,
});
this.fetchList({ this.fetchList({
pageNum: this.data.pageNum + 1, pageNum: this.data.pageNum + 1,
}) })
.then(res => { .then(res => {
wx.hideLoading();
const { list } = res.data; const { list } = res.data;
if (list && list.length) { if (list && list.length) {
this.setData!({ this.setData!({
...@@ -129,6 +140,7 @@ Component({ ...@@ -129,6 +140,7 @@ Component({
} }
}) })
.catch(err => { .catch(err => {
wx.hideLoading();
console.log(err); console.log(err);
}); });
}, },
......
...@@ -109,6 +109,7 @@ Component({ ...@@ -109,6 +109,7 @@ Component({
refreshList() { refreshList() {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true,
}); });
this.fetchList() this.fetchList()
.then(res => { .then(res => {
...@@ -132,6 +133,7 @@ Component({ ...@@ -132,6 +133,7 @@ Component({
getMoreListItem() { getMoreListItem() {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true,
}); });
let nextPage = this.data.pagination[this.data.status].pageNum + 1; let nextPage = this.data.pagination[this.data.status].pageNum + 1;
this.fetchList({ this.fetchList({
......
...@@ -98,6 +98,7 @@ Component({ ...@@ -98,6 +98,7 @@ Component({
refreshList() { refreshList() {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true,
}); });
this.fetchList({}) this.fetchList({})
.then(res => { .then(res => {
...@@ -122,6 +123,7 @@ Component({ ...@@ -122,6 +123,7 @@ Component({
getMoreListItem() { getMoreListItem() {
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
mask: true,
}); });
let nextPage = this.data.pageNum + 1; let nextPage = this.data.pageNum + 1;
this.fetchList({ this.fetchList({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment