diff --git a/common/untool.js b/common/untool.js index c6aafe9..397a2ed 100644 --- a/common/untool.js +++ b/common/untool.js @@ -33,7 +33,12 @@ const goto = (url, type = 1)=> { } const goBack = (opt = {})=> { - uni.navigateBack(opt) + uni.navigateBack({ + fail: ()=>{ + goto(opt._finalUrl || `tabBar/sending/sending`, 1) + }, + ...opt, + }) } const reLaunch = (opt = {})=> { diff --git a/pages/post/post.vue b/pages/post/post.vue index 2be7439..d873076 100644 --- a/pages/post/post.vue +++ b/pages/post/post.vue @@ -303,7 +303,7 @@ // 初始化默认model await initDefaultModel(this.submitParam) this.queryOption.billCode = this.queryOption.billCode || this.queryOption.copyBillCode - this.curPageType = this.pageTypeMap[this.queryOption.type || pageTypeEnum.create] + this.curPageType = this.pageTypeMap[this.queryOption.type] || this.pageTypeMap[pageTypeEnum.create] this.setNavigationBarTitle(this.curPageType.title) this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn) if(this.queryOption.defaultSubParams) { @@ -409,7 +409,7 @@ // 刷新当前页面状态 this.reloadCurrentPage(this) } else { - this.goBack() + this.goBack({_finalUrl: 'tabBar/search/search'}) } } else { this.showToast('操作成功')