浏览代码

[edit] report

wenliming 2 年之前
父节点
当前提交
5dbd53aaa6
共有 3 个文件被更改,包括 40 次插入81 次删除
  1. 1 1
      log-center/logEnum.js
  2. 19 40
      pages/treasure/index.vue
  3. 20 40
      pages/treasure/invite.vue

+ 1 - 1
log-center/logEnum.js

@@ -17,7 +17,7 @@ export const objectType = {
 };
 };
 
 
 export const pageSource = {
 export const pageSource = {
-	newUserLandingPage: 'new-user-landing-page',
+	newUserLandingPage: 'pc-landing-page',
 	mobileLandingPage: 'mobile-landing-page',
 	mobileLandingPage: 'mobile-landing-page',
 	tutorialPage: 'tutorial-page',
 	tutorialPage: 'tutorial-page',
 };
 };

+ 19 - 40
pages/treasure/index.vue

@@ -42,7 +42,7 @@
 import axios from 'axios';
 import axios from 'axios';
 import Cookies from 'js-cookie';
 import Cookies from 'js-cookie';
 import { Toast } from 'vant';
 import { Toast } from 'vant';
-import { isBrowser, appVersionCode } from '../../utils/help.js';
+import { isBrowser, appVersionCode, appType } from '../../utils/help.js';
 import Report from '@/log-center/log';
 import Report from '@/log-center/log';
 import MobileLandPage from '@/components/MobileLandPage.vue';
 import MobileLandPage from '@/components/MobileLandPage.vue';
 import { PlayType } from '@/types';
 import { PlayType } from '@/types';
@@ -173,24 +173,23 @@ export default {
 		if (this.isMobile) {
 		if (this.isMobile) {
 			this.pageSource = Report.pageSource.mobileLandingPage;
 			this.pageSource = Report.pageSource.mobileLandingPage;
 		}
 		}
-		// Report.reportLog({
-		//     baseInfo: {
-		//         appVersionCode: appVersionCode,
-		//         mid: this.mid,
-		//         pageSource: this.pageSource,
-		//         appType,
-		//         machineCode: this.mid
-		//     },
-		//     params: {
-		//         eventData: {
-		//             businessType: Report.businessType.pageView,
-		//             postId: this.detail.postId,
-		//             srcContentId: this.detail.srcContentId,
-		//             senderId: this.detail.srcUserId,
-		//             redPacketType: 2,
-		//         }
-		//     }
-		// })
+		Report.reportLog({
+			baseInfo: {
+				appVersionCode: appVersionCode,
+				mid: this.mid,
+				pageSource: this.pageSource,
+				appType,
+				machineCode: this.mid,
+			},
+			params: {
+				eventData: {
+					businessType: Report.businessType.pageView,
+					postId: this.detail.postId,
+					srcContentId: this.detail.srcContentId,
+					redPacketType: 5,
+				},
+			},
+		});
 	},
 	},
 	methods: {
 	methods: {
 		clickBtn() {
 		clickBtn() {
@@ -211,27 +210,7 @@ export default {
 				}
 				}
 			});
 			});
 		},
 		},
-		trackingClick() {
-			// Report.reportLog({
-			//     baseInfo: {
-			//         appVersionCode: appVersionCode,
-			//         mid: this.mid,
-			//         pageSource: this.pageSource,
-			//         appType,
-			//         machineCode: this.mid
-			//     },
-			//     params: {
-			//         eventData: {
-			//             businessType: Report.businessType.buttonClick,
-			//             objectType: Report.objectType.installButton,
-			//             postId: this.detail.postId,
-			//             srcContentId: this.detail.srcContentId,
-			//             senderId: this.detail.srcUserId,
-			//             redPacketType: 2,
-			//         }
-			//     }
-			// })
-		},
+		trackingClick() {},
 		guid() {
 		guid() {
 			return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
 			return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
 				var r = (Math.random() * 16) | 0,
 				var r = (Math.random() * 16) | 0,

+ 20 - 40
pages/treasure/invite.vue

@@ -42,7 +42,7 @@
 import axios from 'axios';
 import axios from 'axios';
 import Cookies from 'js-cookie';
 import Cookies from 'js-cookie';
 import { Toast } from 'vant';
 import { Toast } from 'vant';
-import { isBrowser, appVersionCode } from '../../utils/help.js';
+import { isBrowser, appVersionCode, appType } from '../../utils/help.js';
 import Report from '@/log-center/log';
 import Report from '@/log-center/log';
 import MobileLandPage from '@/components/MobileLandPage.vue';
 import MobileLandPage from '@/components/MobileLandPage.vue';
 import { PlayType } from '@/types';
 import { PlayType } from '@/types';
@@ -173,24 +173,24 @@ export default {
 		if (this.isMobile) {
 		if (this.isMobile) {
 			this.pageSource = Report.pageSource.mobileLandingPage;
 			this.pageSource = Report.pageSource.mobileLandingPage;
 		}
 		}
-		// Report.reportLog({
-		//     baseInfo: {
-		//         appVersionCode: appVersionCode,
-		//         mid: this.mid,
-		//         pageSource: this.pageSource,
-		//         appType,
-		//         machineCode: this.mid
-		//     },
-		//     params: {
-		//         eventData: {
-		//             businessType: Report.businessType.pageView,
-		//             postId: this.detail.postId,
-		//             srcContentId: this.detail.srcContentId,
-		//             senderId: this.detail.srcUserId,
-		//             redPacketType: 2,
-		//         }
-		//     }
-		// })
+		Report.reportLog({
+			baseInfo: {
+				appVersionCode: appVersionCode,
+				mid: this.mid,
+				pageSource: this.pageSource,
+				appType,
+				machineCode: this.mid,
+			},
+			params: {
+				eventData: {
+					businessType: Report.businessType.pageView,
+					postId: this.detail.postId,
+					srcContentId: this.detail.srcContentId,
+					redPacketType: 5,
+					shareLinkId: window.location.href,
+				},
+			},
+		});
 	},
 	},
 	methods: {
 	methods: {
 		clickBtn() {
 		clickBtn() {
@@ -211,27 +211,7 @@ export default {
 				}
 				}
 			});
 			});
 		},
 		},
-		trackingClick() {
-			// Report.reportLog({
-			//     baseInfo: {
-			//         appVersionCode: appVersionCode,
-			//         mid: this.mid,
-			//         pageSource: this.pageSource,
-			//         appType,
-			//         machineCode: this.mid
-			//     },
-			//     params: {
-			//         eventData: {
-			//             businessType: Report.businessType.buttonClick,
-			//             objectType: Report.objectType.installButton,
-			//             postId: this.detail.postId,
-			//             srcContentId: this.detail.srcContentId,
-			//             senderId: this.detail.srcUserId,
-			//             redPacketType: 2,
-			//         }
-			//     }
-			// })
-		},
+		trackingClick() {},
 		guid() {
 		guid() {
 			return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
 			return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
 				var r = (Math.random() * 16) | 0,
 				var r = (Math.random() * 16) | 0,