From 6ab3d5cc75840692428d64fd337a6b593f9b000f Mon Sep 17 00:00:00 2001
From: linxi <957440651@qq.com>
Date: Tue, 21 Jul 2026 17:19:33 +0800
Subject: [PATCH] =?UTF-8?q?Fix:5536=20=E3=80=90=E5=95=86=E5=9F=8E=E5=B0=8F?=
=?UTF-8?q?=E7=A8=8B=E5=BA=8F=E3=80=91=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E7=82=B9=E5=87=BB=E5=95=86=E5=93=81=E5=9B=BE=E7=89=87=E5=8C=BA?=
=?UTF-8?q?=E5=9F=9F=E4=B9=8B=E5=89=8D=E6=98=AF=E5=8F=AF=E4=BB=A5=E8=BF=9B?=
=?UTF-8?q?=E5=85=A5=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E7=9A=84=EF=BC=8C?=
=?UTF-8?q?=E7=8E=B0=E5=9C=A8=E7=82=B9=E5=87=BB=E6=97=A0=E6=B3=95=E8=BF=9B?=
=?UTF-8?q?=E5=85=A5=E5=95=86=E5=93=81=E8=AF=A6=E6=83=85=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
(cherry picked from commit 3cd6f29e322c10a9083ebff7b865ce8cd8c766dd)
---
pages/order/MyOrder/index.vue | 54 ++++++++++++++++++++++++++++++-----
1 file changed, 47 insertions(+), 7 deletions(-)
diff --git a/pages/order/MyOrder/index.vue b/pages/order/MyOrder/index.vue
index 717ccf3..79a070d 100644
--- a/pages/order/MyOrder/index.vue
+++ b/pages/order/MyOrder/index.vue
@@ -254,22 +254,22 @@
@@ -1299,9 +1299,39 @@ export default {
}
}
},
- gotoGoodDetail(cart, type, query){
+ gotoGoodDetail(orderOrIndex, cartOrIndex) {
+ const order = this.getOrderByIndex(orderOrIndex)
+ const cartList = Array.isArray(order && order.cartInfo) ? order.cartInfo : []
+ const cart = typeof cartOrIndex === 'number' ? cartList[cartOrIndex] : cartOrIndex
+ if (!cart) {
+ uni.showToast({
+ title: '未获取到商品信息',
+ icon: 'none'
+ })
+ return
+ }
+ const productInfo = cart.productInfo || {}
+ let type = 1
+ let id = productInfo.id || cart.productId || ''
+ if (Number(cart.combinationId) > 0) {
+ type = 2
+ id = cart.combinationId
+ } else if (Number(cart.bargainId) > 0) {
+ type = 3
+ id = cart.bargainId
+ } else if (Number(cart.seckillId) > 0) {
+ type = 4
+ id = cart.seckillId
+ }
+ if (!id) {
+ uni.showToast({
+ title: '未获取到商品详情参数',
+ icon: 'none'
+ })
+ return
+ }
// isProductStillExist:0-不存在,1-存在
- const isProductStillExist = cart.isProductStillExist || 0
+ const isProductStillExist = Number(cart.isProductStillExist || 0)
if (isProductStillExist === 0) {
this.$dialog.toast({ mes: '商品已下架' })
return
@@ -1321,7 +1351,17 @@ export default {
path = '/pages/activity/SeckillDetails/index'
break
}
- this.$yrouter.push({ path, query })
+ if (!path) {
+ uni.showToast({
+ title: '未找到商品详情页',
+ icon: 'none'
+ })
+ return
+ }
+ this.$yrouter.push({
+ path,
+ query: { id }
+ })
},
getOrderData() {
getOrderData().then(res => {