jihuaqiang 2 년 전
부모
커밋
87bdecce58
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 4 4
      src/log-center/autoLog/click.js
  2. 4 4
      src/log-center/autoLog/show.js

+ 4 - 4
src/log-center/autoLog/click.js

@@ -8,11 +8,11 @@ let clickDataMap = new Map();
 
 const clickHandle = (e) => { 
     const target = getTargetElementWhenClick(e);
-    const logData = clickDataMap.get(target?.denetClickLogkey);
-    return logData && reportLog({
+    const { extParams, ...eventData } = clickDataMap.get(target?.denetClickLogkey);
+    return eventData && reportLog({
         businessType: Report.businessType.buttonClick,
-        ...logData
-    })
+        ...eventData
+    }, extParams)
 }
 
 const clickLog =  {

+ 4 - 4
src/log-center/autoLog/show.js

@@ -39,11 +39,11 @@ class ShowLogObserver {
     }
 
     report(el) { 
-        const logData = this.showLogMap.get(el?.target?.denetShowLogkey);
-        return logData && reportLog({
+        const { extParams, ...eventData } = this.showLogMap.get(el?.target?.denetShowLogkey);
+        return eventData && reportLog({
             businessType: Report.businessType.pageView,
-            ...logData
-        })
+            ...eventData
+        }, extParams)
     }
 }