Fix:5590 【商城小程序】进入订单详情页时,应默认为全部分类,现在默认进入订单详情页是待支付分类,3个商品订单分类都是同样的问题

This commit is contained in:
LinCyJang
2026-08-02 11:17:59 +08:00
parent 50fe0e78c8
commit 35f7127134
+14 -3
View File
@@ -867,7 +867,7 @@ export default {
this.orderTypeTabChange({
...currentOrderTypeTab,
index: this.orderTypeTabList[this.orderTypeTabIndex] ? this.orderTypeTabIndex : 0
})
}, { resetFilters: false })
},
onShareAppMessage() {
uni.updateShareMenu({
@@ -884,6 +884,12 @@ export default {
getPageQuery() {
return (this.$yroute && this.$yroute.query) || {}
},
resetFilterConditions({ resetType = false } = {}) {
this.keyword = ''
if (resetType) {
this.type = 0
}
},
getDefaultTabListByOrderType(orderType = this.orderType) {
if (orderType === 'travel') {
return [
@@ -1793,15 +1799,20 @@ export default {
query.type = this.type
this.changeType()
},
orderTypeTabChange(item) {
orderTypeTabChange(item, options = {}) {
const { resetFilters = true } = options
this.orderTypeTabIndex = item.index
this.orderType = item.orderType
const query = this.getPageQuery()
query.tabIndex = this.orderTypeTabIndex
this.updateTabListByOrderType()
if (this.type > this.tabList.length - 1) {
if (resetFilters) {
this.type = 0
this.resetFilterConditions()
} else if (this.type > this.tabList.length - 1) {
this.type = 0
}
query.type = this.type
this.changeType(this.type)
},
updateTabListByOrderType() {