mirror of
https://gitee.com/ShopeX/ECShopX_mobile-frontend
synced 2026-08-13 06:35:41 +08:00
修复扫码进首页-页面没有上报&删除多余上报
This commit is contained in:
@@ -46,8 +46,6 @@ function CustomPage(props) {
|
||||
|
||||
useEffect(() => {
|
||||
fetch()
|
||||
entryLaunch.postGuideUV()
|
||||
entryLaunch.postGuideTask()
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -149,8 +149,6 @@ function EspierDetail(props) {
|
||||
|
||||
useEffect(() => {
|
||||
init()
|
||||
entryLaunch.postGuideUV()
|
||||
entryLaunch.postGuideTask()
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -30,10 +30,10 @@ function ShareIand() {
|
||||
if (routeParams?.gu || routeParams?.gu_user_id) { // 导购参数处理
|
||||
Taro.setStorageSync(SG_GUIDE_PARAMS, routeParams)
|
||||
Taro.setStorageSync(SG_GUIDE_PARAMS_UPDATETIME, dayjs().unix())
|
||||
if (S.getAuthToken()) {
|
||||
entryLaunch.postGuideUV() // 导购uv上报
|
||||
entryLaunch.postGuideTask() // 导购任务上报
|
||||
}
|
||||
// if (S.getAuthToken()) {
|
||||
// entryLaunch.postGuideUV() // 导购uv上报
|
||||
// entryLaunch.postGuideTask() // 导购任务上报
|
||||
// }
|
||||
}
|
||||
|
||||
if (routeParams?.t == 1) {
|
||||
@@ -86,6 +86,9 @@ function ShareIand() {
|
||||
delete filteredParams.$taroTimestamp
|
||||
const queryString = qs.stringify(filteredParams)
|
||||
|
||||
entryLaunch.postGuideUV() // 导购uv上报
|
||||
entryLaunch.postGuideTask(welcomeRoutes[from_scene]) // 导购任务上报
|
||||
|
||||
const targetUrl = queryString ? `${welcomeRoutes[from_scene]}?${queryString}` : welcomeRoutes[from_scene]
|
||||
console.log('导购任务分享跳转:', targetUrl, welcomeRoutes[from_scene])
|
||||
|
||||
@@ -128,6 +131,9 @@ function ShareIand() {
|
||||
if (normalizedPath && !normalizedPath.startsWith('/')) {
|
||||
normalizedPath = '/' + normalizedPath
|
||||
}
|
||||
|
||||
entryLaunch.postGuideUV() // 导购uv上报
|
||||
entryLaunch.postGuideTask(normalizedPath) // 导购任务上报
|
||||
|
||||
// 构建目标URL
|
||||
const queryString = qs.stringify(filteredParams)
|
||||
|
||||
@@ -43,8 +43,6 @@ export default class recommendDetail extends Component {
|
||||
screenWidth: res.screenWidth
|
||||
})
|
||||
})
|
||||
entryLaunch.postGuideUV()
|
||||
entryLaunch.postGuideTask()
|
||||
}
|
||||
|
||||
onShareAppMessage(res) {
|
||||
|
||||
@@ -19,8 +19,6 @@ function CouponCenter(props) {
|
||||
const { couponList } = state
|
||||
|
||||
useEffect(() => {
|
||||
entryLaunch.postGuideUV()
|
||||
entryLaunch.postGuideTask()
|
||||
}, [])
|
||||
|
||||
const fetch = async ({ pageIndex, pageSize }) => {
|
||||
|
||||
@@ -549,16 +549,20 @@ class EntryLaunch {
|
||||
/**
|
||||
* 导购任务埋点上报
|
||||
*/
|
||||
async postGuideTask() {
|
||||
async postGuideTask(customPath) {
|
||||
const { path, params } = $instance.router
|
||||
const paths = customPath || path
|
||||
const routePath = {
|
||||
'/pages/item/espier-detail': 'activeItemDetail',
|
||||
'/pages/custom/custom-page': 'activeCustomPage',
|
||||
'/subpage/pages/recommend/detail': 'activeSeedingDetail',
|
||||
'/pages/marketing/coupon-center': 'activeDiscountCoupon',
|
||||
'/pages/cart/espier-checkout': 'orderPaymentSuccess'
|
||||
'/subpages/marketing/coupon-center': 'activeDiscountCoupon',
|
||||
'/pages/cart/espier-checkout': 'orderPaymentSuccess',
|
||||
'/pages/index': 'activeHomePage',
|
||||
'/pages/recommend/list': 'activeRecommendList',
|
||||
'/subpages/member/index': 'activeMemberCenter'
|
||||
}
|
||||
if (!routePath[path]) {
|
||||
if (!routePath[paths]) {
|
||||
return
|
||||
}
|
||||
// gu_user_id: 欢迎语上带过来的员工编号, 同work_user_id
|
||||
@@ -571,7 +575,7 @@ class EntryLaunch {
|
||||
distributor_id: dtid,
|
||||
shop_code,
|
||||
item_id: item_id || id,
|
||||
event_type: routePath[path]
|
||||
event_type: routePath[paths]
|
||||
}
|
||||
api.wx.taskReportData(_params)
|
||||
|
||||
@@ -581,7 +585,7 @@ class EntryLaunch {
|
||||
event_id: employee_number,
|
||||
user_type: 'wechat',
|
||||
user_id,
|
||||
event_type: routePath[path],
|
||||
event_type: routePath[paths],
|
||||
store_bn: shop_code
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user