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 // 确保路径以 / 开头