nieyuge 2 anni fa
parent
commit
250e29e4d8

+ 36 - 1
components/MobileGuidePage.vue

@@ -82,7 +82,7 @@
                 <span>Find the tweet you retweeted, and click the giveaway, you can then install the <span class="special">DeNet Chrome Extension</span> to Get Giveaway.</span>
             </div>
         </div>
-        <div class="retweet">
+        <div class="retweet" @click="retweet">
             <img src="../static/img/icon-retweet.svg" />
             <span>Retweet</span>
         </div>
@@ -90,6 +90,9 @@
 </template>
 
 <script>
+import Report from '../log-center/log';
+import { getMid } from '../utils/help';
+
 export default {
     name: 'mobileGuidePage',
     props: {
@@ -127,7 +130,39 @@ export default {
         }
     },
     methods: {
+        retweet() {
+            let redPacketType;
+            switch(this.playType) {
+                case 1:
+                    redPacketType = 0;
+                    break;
+                case 2:
+                    redPacketType = 1;
+                    break;
+                case 3:
+                    redPacketType = 4;
+                    break;
+            }
 
+            Report.reportLog({
+                baseInfo: {
+					mid: getMid(),
+					pageSource: Report.pageSource.mobileLandingPage,
+					machineCode: getMid(),
+				},
+				params: {
+					eventData: {
+						businessType: Report.businessType.buttonClick,
+						objectType: Report.objectType.rtButton,
+						postId: this.detail.postId,
+                        redPacketType,
+					},
+				},
+            })
+
+            // jump
+            window.location.href = `https://twitter.com/intent/retweet?tweet_id=${this.detail.repostSrcContentId || this.detail.srcContentId}`;
+        }
     }
 }
 </script>

+ 1 - 0
pages/index.vue

@@ -672,6 +672,7 @@ export default {
 						eventData: {
 							businessType: Report.businessType.pageView,
 							postId: this.detail.postId,
+							redPacketType: 0,
 						},
 					},
 				});

+ 1 - 0
pages/luckdraw.vue

@@ -627,6 +627,7 @@ export default {
 						eventData: {
 							businessType: Report.businessType.pageView,
 							postId: this.detail.postId,
+							redPacketType: 1,
 						},
 					},
 				});

+ 1 - 0
pages/treasure/index.vue

@@ -191,6 +191,7 @@ export default {
 						eventData: {
 							businessType: Report.businessType.pageView,
 							postId: this.detail.postId,
+							redPacketType: 4,
 						},
 					},
 				});

+ 1 - 0
pages/treasure/invite.vue

@@ -197,6 +197,7 @@ export default {
 						businessType: Report.businessType.pageView,
 						shareLinkId: this.$route.params.id,
 						postId: this.detail.postId,
+						redPacketType: 4,
 					},
 				},
 			});