提交 ce4b6817 authored 作者: 刘旭's avatar 刘旭

优化跳转

上级 da9d4ee9
...@@ -201,10 +201,14 @@ let init = () => { ...@@ -201,10 +201,14 @@ let init = () => {
onBackPress((options: any) => { onBackPress((options: any) => {
let pages = getCurrentPages(); // 当前页面路由 let pages = getCurrentPages(); // 当前页面路由
let route = pages[pages.length - 2].route; // 上一个页面路由 let route = JSON.parse(JSON.stringify(pages[pages.length - 2].route)) // 上一个页面路由
if (options.from === 'backbutton' && route == 'pages/order/quotation') let route1 = JSON.parse(JSON.stringify(pages[pages.length - 3].route)) // 上一个页面路由
// return uni.navigateBack({ delta: 4 }) let route2 = JSON.parse(JSON.stringify(pages[pages.length - 4].route)) // 上一个页面路由
return uni.reLaunch({ url: '/' }) if (options.from === 'backbutton' && route == 'pages/order/quotation') {
if (route2 && route2 == 'pages/order/checkout') return uni.navigateBack({ delta: 1 })
console.log('跳转', route, route1);
return uni.navigateBack({ delta: 2 })
}
}) })
</script> </script>
......
...@@ -250,7 +250,7 @@ onLoad((options: any) => { ...@@ -250,7 +250,7 @@ onLoad((options: any) => {
quotationExist({ orderId: orderId.value }).then((res: any) => { quotationExist({ orderId: orderId.value }).then((res: any) => {
if (res.data.code === 200) { if (res.data.code === 200) {
if (res.data.data) { if (res.data.data) {
uni.reLaunch({ uni.navigateTo({
url: '../order/editQuotation?orderId=' + orderId.value url: '../order/editQuotation?orderId=' + orderId.value
}) })
} else { } else {
...@@ -379,12 +379,11 @@ let modelConfirm = () => { ...@@ -379,12 +379,11 @@ let modelConfirm = () => {
} }
let handleSheet = (index: number) => { let handleSheet = (index: number) => {
console.log(index); if (index)
// if (index) open(baseUrl + '/wx/quotation/download/pdf?orderId=' + orderId.value)
// open(baseUrl + '/wx/quotation/download/pdf?orderId=' + orderId.value) else
// else open(baseUrl + '/wx/quotation/download?orderId=' + orderId.value)
// open(baseUrl + '/wx/quotation/download?orderId=' + orderId.value) uni.navigateBack({ delta: 1 })
// uni.navigateBack({ delta: 1 })
showSheet.value = false showSheet.value = false
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论