订单页面增加下拉刷新

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",
"style": {
"navigationBarTitleText": "熊熊安装队",
"enablePullDownRefresh": true
"navigationBarTitleText": "熊熊安装队"
}
},
{
@ -46,7 +45,8 @@
{
"path": "pages/order/order",
"style": {
"navigationBarTitleText": "我的订单"
"navigationBarTitleText": "我的订单",
"enablePullDownRefresh": true
}
},
{

View File

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