From 76c89a7a7dd0c9d8da570ba34c3644fab83aa18e Mon Sep 17 00:00:00 2001 From: maqian Date: Tue, 30 Sep 2025 22:01:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=9C=89=E5=9C=BA=E6=99=AF=E5=80=BC?= =?UTF-8?q?=E6=89=8D=E4=BC=A0=E5=AF=BC=E8=B4=AD=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/cart/espier-checkout.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js index b218a5300..92ed7f78d 100644 --- a/src/pages/cart/espier-checkout.js +++ b/src/pages/cart/espier-checkout.js @@ -476,7 +476,7 @@ function CartCheckout(props) { if (couponInfo?.coupon_code) { url = `${url}&coupon=${couponInfo?.coupon_code}` } - if (storageParams?.cxdid) { + if (storageParams?.cxdid && scene) { url = `${url}&cxdid=${storageParams?.cxdid}` } Taro.navigateTo({ @@ -805,7 +805,8 @@ function CartCheckout(props) { distributor_id: receiptType === 'ziti' && ziti_shopid ? ziti_shopid : shop_id } // 处理导购数据(旧) - if (storageParams?.cxdid) { + if (storageParams?.cxdid && scene) { + debugger cus_parmas.cxdid = storageParams?.cxdid; cus_parmas.distributor_id = storageParams?.dtid; cus_parmas.cart_type = "cxd"; From 34d4beb03759c723d1125bac6f2051bd11272b38 Mon Sep 17 00:00:00 2001 From: maqian Date: Fri, 10 Oct 2025 16:17:52 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AF=BC=E8=B4=ADuv=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useLogin.js | 2 +- src/pages/cart/espier-checkout.js | 1 + src/pages/custom/custom-page.js | 1 + src/pages/item/espier-detail.js | 1 + src/pages/share-land.js | 2 +- src/subpage/pages/recommend/detail.js | 1 + src/subpages/marketing/coupon-center.js | 1 + src/utils/entryLaunch.js | 13 ++++++++++++- 8 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/hooks/useLogin.js b/src/hooks/useLogin.js index c84eb60b1..ba69a9304 100644 --- a/src/hooks/useLogin.js +++ b/src/hooks/useLogin.js @@ -88,7 +88,7 @@ export default (props = {}) => { setIsLogin(true) await getUserInfo() // 导购UV统计 - // entryLaunch.postGuideUV() + entryLaunch.postGuideUV() entryLaunch.postGuideTask() dispatch(updateIsNewUser(false)) dispatch(fetchUserFavs()) diff --git a/src/pages/cart/espier-checkout.js b/src/pages/cart/espier-checkout.js index 92ed7f78d..6827c62ef 100644 --- a/src/pages/cart/espier-checkout.js +++ b/src/pages/cart/espier-checkout.js @@ -367,6 +367,7 @@ function CartCheckout(props) { orderInfo, () => { entryLaunch.postGuideUV() + entryLaunch.postGuideUVBind() entryLaunch.postGuideTask() } ) diff --git a/src/pages/custom/custom-page.js b/src/pages/custom/custom-page.js index 11d088760..f192dedd8 100644 --- a/src/pages/custom/custom-page.js +++ b/src/pages/custom/custom-page.js @@ -46,6 +46,7 @@ function CustomPage(props) { useEffect(() => { fetch() + entryLaunch.postGuideUV() entryLaunch.postGuideTask() }, []) diff --git a/src/pages/item/espier-detail.js b/src/pages/item/espier-detail.js index e29767059..2053e4c39 100644 --- a/src/pages/item/espier-detail.js +++ b/src/pages/item/espier-detail.js @@ -146,6 +146,7 @@ function EspierDetail(props) { useEffect(() => { init() + entryLaunch.postGuideUV() entryLaunch.postGuideTask() }, []) diff --git a/src/pages/share-land.js b/src/pages/share-land.js index a032593b5..497501fea 100644 --- a/src/pages/share-land.js +++ b/src/pages/share-land.js @@ -52,7 +52,7 @@ function ShareIand() { Taro.setStorageSync(SG_GUIDE_PARAMS_UPDATETIME, dayjs().unix()) if (S.getAuthToken()) { - // entryLaunch.postGuideUV() + entryLaunch.postGuideUV() entryLaunch.postGuideTask() } } else { diff --git a/src/subpage/pages/recommend/detail.js b/src/subpage/pages/recommend/detail.js index a5a793486..6960f4ba8 100644 --- a/src/subpage/pages/recommend/detail.js +++ b/src/subpage/pages/recommend/detail.js @@ -43,6 +43,7 @@ export default class recommendDetail extends Component { screenWidth: res.screenWidth }) }) + entryLaunch.postGuideUV() entryLaunch.postGuideTask() } diff --git a/src/subpages/marketing/coupon-center.js b/src/subpages/marketing/coupon-center.js index 571e458aa..bea9feb9f 100644 --- a/src/subpages/marketing/coupon-center.js +++ b/src/subpages/marketing/coupon-center.js @@ -19,6 +19,7 @@ function CouponCenter(props) { const { couponList } = state useEffect(() => { + entryLaunch.postGuideUV() entryLaunch.postGuideTask() }, []) diff --git a/src/utils/entryLaunch.js b/src/utils/entryLaunch.js index aa52bf3d7..df6beb0d4 100644 --- a/src/utils/entryLaunch.js +++ b/src/utils/entryLaunch.js @@ -519,6 +519,7 @@ class EntryLaunch { * 导购UV统计 */ async postGuideUV() { + if (!S.getAuthToken()) return const routerParams = Taro.getStorageSync(SG_GUIDE_PARAMS) const { gu } = routerParams || {} if (gu) { @@ -526,7 +527,17 @@ class EntryLaunch { await api.user.uniquevisito({ work_userid }) - // 导购关系绑定 + } + } + + /** + * 导购关系绑定 + */ + async postGuideUVBind() { + const routerParams = Taro.getStorageSync(SG_GUIDE_PARAMS) + const { gu } = routerParams || {} + if (gu) { + const [work_userid] = gu.split('_') await api.user.bindSaleperson({ work_userid })