Fix:5693 【商城小程序】【我的订单-订单列表】删除已完成订单后,页面跳转至“购物”Tab
This commit is contained in:
@@ -864,14 +864,7 @@ export default {
|
||||
} else if (needRefreshOrderList) {
|
||||
uni.removeStorageSync('needRefreshMyOrderList')
|
||||
this.getOrderData()
|
||||
if (this.savedScrollTop > 0) {
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: this.savedScrollTop,
|
||||
duration: 0
|
||||
})
|
||||
})
|
||||
}
|
||||
this.refreshOrderListKeepPosition()
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -1866,7 +1859,7 @@ export default {
|
||||
keyword,
|
||||
orderType
|
||||
} = this
|
||||
getOrderList({
|
||||
return getOrderList({
|
||||
page,
|
||||
limit,
|
||||
type,
|
||||
@@ -1889,6 +1882,24 @@ export default {
|
||||
uni.hideLoading()
|
||||
});
|
||||
},
|
||||
// 保持当前主/子tab及滚动位置刷新列表(从订单详情页返回后同步删除等状态变更)
|
||||
refreshOrderListKeepPosition() {
|
||||
this.orderListRequestId += 1
|
||||
this.page = 1
|
||||
this.loaded = false
|
||||
this.loading = false
|
||||
const restoreScrollTop = this.savedScrollTop
|
||||
this.getOrderListReq().then(() => {
|
||||
if (restoreScrollTop > 0) {
|
||||
this.$nextTick(() => {
|
||||
uni.pageScrollTo({
|
||||
scrollTop: restoreScrollTop,
|
||||
duration: 0
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
tapShowMore(index) {
|
||||
const order = this.getOrderByIndex(index)
|
||||
if (!order) {
|
||||
|
||||
Reference in New Issue
Block a user