浏览代码

report data

nieyuge 2 年之前
父节点
当前提交
71d94a4f0b
共有 2 个文件被更改,包括 11 次插入21 次删除
  1. 2 2
      log-center/logger.js
  2. 9 19
      pages/index.vue

+ 2 - 2
log-center/logger.js

@@ -30,9 +30,9 @@ function paramsPretreatmentAndRequest(logType, params) {
         url: location.href,
         browser,
         platform,
-        ...extParams,
+        ...eventData,
     }
-    extParams = wrapObject(extData)
+    eventData = wrapObject(extData)
     params.params.logType = logType;
     params.params.eventData = JSON.stringify(eventData)
     params.params.extParams  = JSON.stringify(extParams)

+ 9 - 19
pages/index.vue

@@ -331,14 +331,12 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.buttonClick,
-						objectType: Report.objectType.copyLinkButton
-					},
-                    extParams: {
+						objectType: Report.objectType.copyLinkButton,
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
                         status: this.status,
-                    }
+					},
 				}
 			})
 		},
@@ -363,14 +361,12 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.buttonClick,
-						objectType: Report.objectType.installButton
-					},
-                    extParams: {
+						objectType: Report.objectType.installButton,
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
                         status: this.status,
-                    }
+					},
 				}
 			})
 			switch (extensionsInstallChannel) {
@@ -631,14 +627,12 @@ export default {
                     },
                     params: {
                         eventData: {
-                            businessType: Report.businessType.pageView
-                        },
-                        extParams: {
+                            businessType: Report.businessType.pageView,
                             postId: this.detail.postId,
                             srcContentId: this.detail.srcContentId,
                             senderId: this.detail.srcUserId,
                             status: this.status,
-                        }
+                        },
                     }
                 })
             }, 500)
@@ -685,16 +679,14 @@ export default {
                     params: {
                         eventData: {
                             businessType: Report.businessType.pageView,
-                        },
-                        extParams: {
                             postId: this.detail.postId,
                             srcContentId: this.detail.srcContentId,
                             senderId: this.detail.srcUserId,
                             status: this.status,
-                        }
+                        },
                     }
                 });
-            }, 500)
+            }, 1000)
 		} else {
 			this.show_home = true
 			this.status = 'no-chrome'
@@ -709,13 +701,11 @@ export default {
 				params: {
 					eventData: {
 						businessType: Report.businessType.pageView,
-					},
-                    extParams: {
                         postId: this.detail.postId,
                         srcContentId: this.detail.srcContentId,
                         senderId: this.detail.srcUserId,
                         status: this.status,
-                    }
+					},
 				}
 			})
 		}