From 3c3005690825e81dc8137ff82ab4b9f89e7f5cf8 Mon Sep 17 00:00:00 2001 From: maqian Date: Wed, 5 Nov 2025 18:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/cart/espier-checkout.js | 6 +++--- src/pages/share-land.js | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js index 6827c62ef..d8d907b30 100644 --- a/src/pages/cart/espier-checkout.js +++ b/src/pages/cart/espier-checkout.js @@ -131,6 +131,7 @@ function CartCheckout(props) { scene, // 情景值 goodType = routerParams.goodType } = $instance?.router?.params || {} + const { scene: launchScene } = Taro.getLaunchOptionsSync() console.log('$instance.router?.params:', $instance.router) useEffect(() => { @@ -477,7 +478,7 @@ function CartCheckout(props) { if (couponInfo?.coupon_code) { url = `${url}&coupon=${couponInfo?.coupon_code}` } - if (storageParams?.cxdid && scene) { + if (storageParams?.cxdid && launchScene == 1047) { url = `${url}&cxdid=${storageParams?.cxdid}` } Taro.navigateTo({ @@ -806,8 +807,7 @@ function CartCheckout(props) { distributor_id: receiptType === 'ziti' && ziti_shopid ? ziti_shopid : shop_id } // 处理导购数据(旧) - if (storageParams?.cxdid && scene) { - debugger + if (storageParams?.cxdid && launchScene == 1047) { cus_parmas.cxdid = storageParams?.cxdid; cus_parmas.distributor_id = storageParams?.dtid; cus_parmas.cart_type = "cxd"; diff --git a/src/pages/share-land.js b/src/pages/share-land.js index 0785c1e98..db34ac41c 100644 --- a/src/pages/share-land.js +++ b/src/pages/share-land.js @@ -82,11 +82,8 @@ function ShareIand() { // 过滤掉内部使用的参数 const filteredParams = { ...otherParams } - // delete filteredParams.scene + delete filteredParams.scene delete filteredParams.$taroTimestamp - if (router.params?.scene) { // 跳转的时候需要把scene参数传递过去,不然代客下单的时候会有问题 - filteredParams.scene = router.params.scene - } const queryString = qs.stringify(filteredParams) const targetUrl = queryString ? `${welcomeRoutes[from_scene]}?${queryString}` : welcomeRoutes[from_scene] @@ -123,7 +120,7 @@ function ShareIand() { // 过滤掉内部使用的参数 const filteredParams = { ...otherParams } - // delete filteredParams.scene + delete filteredParams.scene delete filteredParams.$taroTimestamp // 确保路径以 / 开头