goback兜底处理
This commit is contained in:
parent
49a953aee9
commit
5e520734eb
@ -33,7 +33,12 @@ const goto = (url, type = 1)=> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goBack = (opt = {})=> {
|
const goBack = (opt = {})=> {
|
||||||
uni.navigateBack(opt)
|
uni.navigateBack({
|
||||||
|
fail: ()=>{
|
||||||
|
goto(opt._finalUrl || `tabBar/sending/sending`, 1)
|
||||||
|
},
|
||||||
|
...opt,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const reLaunch = (opt = {})=> {
|
const reLaunch = (opt = {})=> {
|
||||||
|
|||||||
@ -303,7 +303,7 @@
|
|||||||
// 初始化默认model
|
// 初始化默认model
|
||||||
await initDefaultModel(this.submitParam)
|
await initDefaultModel(this.submitParam)
|
||||||
this.queryOption.billCode = this.queryOption.billCode || this.queryOption.copyBillCode
|
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.setNavigationBarTitle(this.curPageType.title)
|
||||||
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
|
this.isEdit = Boolean(this.queryOption.billCode || this.queryOption.orderSn)
|
||||||
if(this.queryOption.defaultSubParams) {
|
if(this.queryOption.defaultSubParams) {
|
||||||
@ -409,7 +409,7 @@
|
|||||||
// 刷新当前页面状态
|
// 刷新当前页面状态
|
||||||
this.reloadCurrentPage(this)
|
this.reloadCurrentPage(this)
|
||||||
} else {
|
} else {
|
||||||
this.goBack()
|
this.goBack({_finalUrl: 'tabBar/search/search'})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.showToast('操作成功')
|
this.showToast('操作成功')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user