Explorar o código

Merge branch 'dev_1.1.5' of https://git.yishihui.com/DeNet/de-net into dev_1.1.5

wenliming %!s(int64=2) %!d(string=hai) anos
pai
achega
c39bdecd85

+ 41 - 9
src/view/iframe/red-packet/luck-draw.vue

@@ -503,6 +503,8 @@ let state = reactive({
     page_index: 1,
     page_size: 20,
     srcContentId: '',
+    customCover: '',
+    customGiveaway: '',
     error_txt: `oops, new accounts cannot participate in this event,`,
     receiveAmount: 0,
     money: 0,
@@ -599,6 +601,8 @@ async function clickLikeBtn() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 function clickDone() {
@@ -611,7 +615,9 @@ function clickDone() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 function handleScroll(e) {
@@ -712,6 +718,8 @@ async function clickRetweetBtn() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 
@@ -772,7 +780,9 @@ async function clickReply(params) {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 
@@ -814,7 +824,9 @@ async function clickRepostFacebook(params) {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 
@@ -1022,7 +1034,9 @@ async function clickFollowAll(item, is_all) {
     let _log_obj = {
         pageSource: Report.pageSource.task_page,
         businessType: Report.businessType.buttonClick,
-        objectType: Report.objectType.follow
+        objectType: Report.objectType.follow,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     }
     if (is_all) {
         _log_obj.objectType = Report.objectType.follow_button
@@ -1146,7 +1160,9 @@ const showSuccessPage = () => {
             senderId: state.userId,
             isOldTwitterFans: reportParams.done.follow,
             isOldDiscordFans: reportParams.done.join_discord,
-            redPacketType: 1
+            redPacketType: 1,
+            customCover: state.customCover,
+            customGiveaway: state.customGiveaway,
         });
     }
 }
@@ -1165,7 +1181,9 @@ const showNotOpenPage = () => {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 const showOpenedPage = () => {
@@ -1188,7 +1206,9 @@ const showOpenedPageReport = () => {
         senderId: state.userId,
         isOldTwitterFans: state.done.follow,
         isOldDiscordFans: state.done.join_discord,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 
@@ -1371,6 +1391,8 @@ function init(initParams) {
             state.tweetId = state.srcContentId;
             state.userId = res.data.srcUserId;
             state.tweet_author = state.detail.postUserInfo && state.detail.postUserInfo.nickName || '';
+            state.customCover = state.detail.posterType == 2 ? 1 : 0;
+            state.customGiveaway = state.detail.posterType == 2 ? 1 : 0;
             // 不要删除这个console
             console.log('postBizData', state.detail)
             checkFacebookReply();
@@ -1612,7 +1634,9 @@ function handleRedPacket() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 }
 
@@ -1674,6 +1698,8 @@ function handleFinishRedPacket() {
                     postId: state.postId,
                     srcContentId: state.tweetId,
                     senderId: state.userId,
+                    customCover: state.customCover,
+                    customGiveaway: state.customGiveaway,
                 }, {
                     get_giveaway_result: Report.extParams.success
                 });
@@ -1754,6 +1780,8 @@ function handleFinishRedPacket() {
                     postId: state.postId,
                     srcContentId: state.tweetId,
                     senderId: state.userId,
+                    customCover: state.customCover,
+                    customGiveaway: state.customGiveaway,
                 }, {
                     get_giveaway_result: Report.extParams.failure,
                 });
@@ -1771,6 +1799,8 @@ function handleFinishRedPacket() {
                 postId: state.postId,
                 srcContentId: state.tweetId,
                 senderId: state.userId,
+                customCover: state.customCover,
+                customGiveaway: state.customGiveaway,
             }, {
                 get_giveaway_result: Report.extParams.failure,
             });
@@ -2077,7 +2107,9 @@ async function joinDiscord() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
-        redPacketType: 1
+        redPacketType: 1,
+        customCover: state.customCover,
+        customGiveaway: state.customGiveaway,
     });
 
     let url = getInviteUrl();

+ 25 - 9
src/view/iframe/red-packet/red-packet.vue

@@ -453,6 +453,7 @@ let state = reactive({
   page_index: 1,
   page_size: 20,
   srcContentId: '',
+  customCover: '',
   error_txt: `oops, new accounts cannot participate in this event,`,
   receiveAmount: 0,
   money: 0,
@@ -545,6 +546,7 @@ async function clickLikeBtn() {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
+    customCover: state.customCover,
   });
 }
 function clickDone() {
@@ -557,7 +559,8 @@ function clickDone() {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 function handleScroll(e) {
@@ -658,6 +661,7 @@ async function clickRetweetBtn() {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
+    customCover: state.customCover,
   });
 }
 
@@ -696,7 +700,8 @@ async function clickReply(params) {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 
@@ -738,7 +743,8 @@ async function clickRepostFacebook(params) {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 
@@ -905,7 +911,8 @@ async function clickFollowAll(item, is_all) {
   let _log_obj = {
     pageSource: Report.pageSource.task_page,
     businessType: Report.businessType.buttonClick,
-    objectType: Report.objectType.follow
+    objectType: Report.objectType.follow,
+    customCover: state.customCover,
   }
   if (is_all) {
     _log_obj.objectType = Report.objectType.follow_button
@@ -1021,7 +1028,8 @@ const showSuccessPage = () => {
     senderId: state.userId,
     isOldTwitterFans: reportParams.done.follow,
     isOldDiscordFans: reportParams.done.join_discord,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 const showNotOpenPage = () => {
@@ -1032,7 +1040,8 @@ const showNotOpenPage = () => {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 const showOpenedPage = () => {
@@ -1053,7 +1062,8 @@ const showOpenedPageReport = () => {
     senderId: state.userId,
     isOldTwitterFans: state.done.follow,
     isOldDiscordFans: state.done.join_discord,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 
@@ -1211,6 +1221,7 @@ function init(initParams) {
       state.tweetId = state.srcContentId;
       state.userId = res.data.srcUserId;
       state.tweet_author = state.detail.postUserInfo && state.detail.postUserInfo.nickName || '';
+      state.customCover = state.detail.posterType == 2 ? 1 : 0;
       // 不要删除这个console
       console.log('postBizData', state.detail)
       checkFacebookReply();
@@ -1411,7 +1422,8 @@ function handleRedPacket() {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 }
 
@@ -1479,6 +1491,7 @@ function handleFinishRedPacket() {
           postId: state.postId,
           srcContentId: state.tweetId,
           senderId: state.userId,
+          customCover: state.customCover,
         }, {
           get_giveaway_result: Report.extParams.success
         });
@@ -1558,6 +1571,7 @@ function handleFinishRedPacket() {
           postId: state.postId,
           srcContentId: state.tweetId,
           senderId: state.userId,
+          customCover: state.customCover,
         }, {
           get_giveaway_result: Report.extParams.failure,
         });
@@ -1574,6 +1588,7 @@ function handleFinishRedPacket() {
         postId: state.postId,
         srcContentId: state.tweetId,
         senderId: state.userId,
+        customCover: state.customCover,
       }, {
         get_giveaway_result: Report.extParams.failure,
       });
@@ -1879,7 +1894,8 @@ async function joinDiscord() {
     postId: state.postId,
     srcContentId: state.tweetId,
     senderId: state.userId,
-    redPacketType: 0
+    redPacketType: 0,
+    customCover: state.customCover,
   });
 
   let url = getInviteUrl();