订单页面增加下拉刷新

This commit is contained in:
TOP糯米 2023-03-12 01:21:44 +08:00
parent bc943509f3
commit bcf848fbad
2 changed files with 8 additions and 5 deletions

View File

@ -3,8 +3,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "熊熊安装队", "navigationBarTitleText": "熊熊安装队"
"enablePullDownRefresh": true
} }
}, },
{ {
@ -46,7 +45,8 @@
{ {
"path": "pages/order/order", "path": "pages/order/order",
"style": { "style": {
"navigationBarTitleText": "我的订单" "navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -112,7 +112,10 @@ export default {
onReachBottom() { onReachBottom() {
this.loadData(); this.loadData();
}, },
onPullDownRefresh() {}, onPullDownRefresh() {
this.switchTab(this.tabIndex);
uni.stopPullDownRefresh();
},
methods: { methods: {
/** /**
* 切换tab页 * 切换tab页
@ -145,7 +148,7 @@ export default {
let currentTab = this.tabList[this.tabIndex]; let currentTab = this.tabList[this.tabIndex];
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (!currentTab.more) { if (!currentTab.more) {
return reject("没有更多了"); return;
} }
this.$models.order this.$models.order
.orderList({ .orderList({