consumer模块完成度95%,检查消费者前端bug并修复

This commit is contained in:
cyh666666
2026-03-09 17:20:59 +08:00
parent 7b5801a72b
commit 2262d1bfd9
128 changed files with 13485 additions and 1670 deletions

View File

@@ -746,21 +746,16 @@ const shareForFree = async () => {
// 使用 onBackPress 拦截物理返回键和系统导航栏返回
onBackPress((_): boolean => {
const pages = getCurrentPages()
console.log('[order-detail onBackPress] pages count:', pages.length)
if (pages.length > 1) {
// @ts-ignore
const prevPage = pages[pages.length - 2]
// @ts-ignore
const prevRoute: string = prevPage.route ?? ''
if (prevRoute.includes('product-detail') || prevRoute.includes('payment')) {
uni.redirectTo({ url: '/pages/mall/consumer/orders' })
return true
}
} else {
uni.redirectTo({ url: '/pages/mall/consumer/orders' })
return true
// 正常返回上一页
return false
}
return false
// 如果只有当前页面,跳转到 orders
uni.redirectTo({ url: '/pages/mall/consumer/orders' })
return true
})
// 生命周期 - 在所有函数定义之后