Fix:5590 【商城小程序】进入订单详情页时,应默认为全部分类,现在默认进入订单详情页是待支付分类,3个商品订单分类都是同样的问题
This commit is contained in:
@@ -867,7 +867,7 @@ export default {
|
|||||||
this.orderTypeTabChange({
|
this.orderTypeTabChange({
|
||||||
...currentOrderTypeTab,
|
...currentOrderTypeTab,
|
||||||
index: this.orderTypeTabList[this.orderTypeTabIndex] ? this.orderTypeTabIndex : 0
|
index: this.orderTypeTabList[this.orderTypeTabIndex] ? this.orderTypeTabIndex : 0
|
||||||
})
|
}, { resetFilters: false })
|
||||||
},
|
},
|
||||||
onShareAppMessage() {
|
onShareAppMessage() {
|
||||||
uni.updateShareMenu({
|
uni.updateShareMenu({
|
||||||
@@ -884,6 +884,12 @@ export default {
|
|||||||
getPageQuery() {
|
getPageQuery() {
|
||||||
return (this.$yroute && this.$yroute.query) || {}
|
return (this.$yroute && this.$yroute.query) || {}
|
||||||
},
|
},
|
||||||
|
resetFilterConditions({ resetType = false } = {}) {
|
||||||
|
this.keyword = ''
|
||||||
|
if (resetType) {
|
||||||
|
this.type = 0
|
||||||
|
}
|
||||||
|
},
|
||||||
getDefaultTabListByOrderType(orderType = this.orderType) {
|
getDefaultTabListByOrderType(orderType = this.orderType) {
|
||||||
if (orderType === 'travel') {
|
if (orderType === 'travel') {
|
||||||
return [
|
return [
|
||||||
@@ -1793,15 +1799,20 @@ export default {
|
|||||||
query.type = this.type
|
query.type = this.type
|
||||||
this.changeType()
|
this.changeType()
|
||||||
},
|
},
|
||||||
orderTypeTabChange(item) {
|
orderTypeTabChange(item, options = {}) {
|
||||||
|
const { resetFilters = true } = options
|
||||||
this.orderTypeTabIndex = item.index
|
this.orderTypeTabIndex = item.index
|
||||||
this.orderType = item.orderType
|
this.orderType = item.orderType
|
||||||
const query = this.getPageQuery()
|
const query = this.getPageQuery()
|
||||||
query.tabIndex = this.orderTypeTabIndex
|
query.tabIndex = this.orderTypeTabIndex
|
||||||
this.updateTabListByOrderType()
|
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
|
this.type = 0
|
||||||
}
|
}
|
||||||
|
query.type = this.type
|
||||||
this.changeType(this.type)
|
this.changeType(this.type)
|
||||||
},
|
},
|
||||||
updateTabListByOrderType() {
|
updateTabListByOrderType() {
|
||||||
|
|||||||
Reference in New Issue
Block a user