mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-11 22:15:32 +08:00
fix(custom): 代客下单-参数传递
This commit is contained in:
@@ -149,6 +149,8 @@ function CartCheckout(props) {
|
||||
scene, // 情景值
|
||||
goodType = routerParams.goodType
|
||||
} = $instance?.router?.params || {}
|
||||
const { scene: launchScene } = Taro.getLaunchOptionsSync()
|
||||
const senceCode = [1011, 1012, 1013, 1047, 1048, 1049] // 扫码进来-代客下单
|
||||
console.log('$instance.router?.params:', $instance.router)
|
||||
|
||||
useEffect(() => {
|
||||
@@ -500,7 +502,7 @@ function CartCheckout(props) {
|
||||
if (couponInfo?.coupon_code) {
|
||||
url = `${url}&coupon=${couponInfo?.coupon_code}`
|
||||
}
|
||||
if (storageParams?.cxdid && scene) {
|
||||
if (storageParams?.cxdid && senceCode.includes(launchScene)) {
|
||||
url = `${url}&cxdid=${storageParams?.cxdid}`
|
||||
}
|
||||
Taro.navigateTo({
|
||||
@@ -831,7 +833,7 @@ function CartCheckout(props) {
|
||||
distributor_id: receiptType === 'ziti' && ziti_shopid ? ziti_shopid : shop_id
|
||||
}
|
||||
// 处理导购数据(旧)
|
||||
if (storageParams?.cxdid && scene) {
|
||||
if (storageParams?.cxdid && senceCode.includes(launchScene)) {
|
||||
debugger
|
||||
cus_parmas.cxdid = storageParams?.cxdid;
|
||||
cus_parmas.distributor_id = storageParams?.dtid;
|
||||
|
||||
@@ -96,15 +96,12 @@ 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]
|
||||
console.log('导购任务分享跳转:', targetUrl)
|
||||
console.log('导购任务分享跳转:', targetUrl, welcomeRoutes[from_scene])
|
||||
|
||||
if (welcomeRoutes[from_scene]) {
|
||||
Taro.redirectTo({ url: targetUrl })
|
||||
|
||||
@@ -12638,5 +12638,10 @@
|
||||
"zh-cn": "开票失败",
|
||||
"en": "",
|
||||
"zh-tw": ""
|
||||
},
|
||||
"hp8xmu6": {
|
||||
"zh-cn": "页面跳转失败",
|
||||
"en": "",
|
||||
"zh-tw": ""
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user