Jelajahi Sumber

[edit] repost content

wenliming 2 tahun lalu
induk
melakukan
b79b6d89d9

+ 2 - 0
src/log-center/logEnum.js

@@ -26,6 +26,8 @@ export const objectType = {
     loginButton: "login-button",
     withdrawButton: "withdraw-button",
     topupButton: "topup-button",
+    previewNextButton: 'preview-next-button',
+    setPublishContent: 'set-publish-content',
 
 
     getMoreGiveaway: "get-more-giveaway",

+ 29 - 2
src/logic/content/twitter.js

@@ -11,6 +11,8 @@ import { clearPostContent, setGroupIconStatus } from '@/logic/content/nft.js'
 import { toolBox } from '@/logic/content/ToolBox'
 import axios from 'axios';
 import messageCenter from '@/uilts/messageCenter';
+import { PlayType } from '@/types';
+import { reSetBindPostContent } from '@/http/help.js'
 
 let dom = {};
 
@@ -118,6 +120,13 @@ export function showTwitterPublishDialogHandler(publishRes) {
     // _setPublishContent(publishRes.srcContent);
     setDialogPublishContent(publishRes.srcContent);
     _publishTweetEvent(publishRes, bindTwitterArtMethod);
+
+    Report.reportLog({
+      businessType: Report.businessType.pageView,
+      objectType: Report.objectType.setPublishContent,
+      postId: publishRes.postId
+    }, {
+    });
 }
 
 export function twitterPublishHandler(res) {
@@ -227,12 +236,30 @@ function _publishTweetEvent(params, cb) {
             bindTwitterArt.needBind = true;
             bindTwitterArt.postId = params.postId;
             tweetPublishStore.showPublishDialog = false;
+
+            bindContentStr(params);
             // checkIsShowReSend(dialog, params);
             cb && cb()
         });
     }, 800)
 }
 
+function bindContentStr(params) {
+  if(params && params.postBizData) {
+    if(typeof params.postBizData == 'string') {
+      let objBizData = JSON.parse(params.postBizData);
+      let inputEle = document.querySelector('div[contenteditable="true"]');
+      if(objBizData.luckdropType == PlayType.treasure && inputEle) {
+        let textContent = inputEle.innerText;
+        reSetBindPostContent({
+          postId: params.postId,
+          postSrcContent: textContent,
+        })
+      }
+    }
+  }
+}
+
 function onClosePublishDialogHandle(dom, params) {
     // 如果是 Tool box
     if (params.postType == 3) {
@@ -2627,7 +2654,7 @@ export const showPublishDialog = () => {
     }
 }
 
-// 获取推文发送回去 
+// 获取推文发送回去
 export const sendContentByTwitterID = (tweet_Id) => {
     // 获取内容
     let txt = parseCard.getContentByTwitterId(tweet_Id)
@@ -2638,4 +2665,4 @@ export const sendContentByTwitterID = (tweet_Id) => {
             txt
         }
     })
-}
+}

+ 16 - 0
src/view/iframe/publish/give-dialog.vue

@@ -1361,6 +1361,14 @@ const payStatusHandle = (payStatus) => {
     switch (payStatus) {
         case 1:
             emits("postPublishFinish", { publishRes });
+            Report.reportLog({
+              pageSource: Report.pageSource.previewPage,
+              businessType: Report.businessType.buttonClick,
+              objectType: Report.objectType.previewNextButton,
+              postId: publishRes.postId
+            }, {
+              type: Report.getCurrentBizType(selectModeInfo.type)
+            });
             showComType.value = "default";
             initParams();
             break;
@@ -2167,6 +2175,14 @@ const onToolBoxPageChange = (params) => {
 
 const toolBoxPublishFinish = (params) => {
     toolBoxPageData.activePage = 'EDITOR';
+    Report.reportLog({
+      pageSource: Report.pageSource.previewPage,
+      businessType: Report.businessType.buttonClick,
+      objectType: Report.objectType.previewNextButton,
+      postId: params.publishRes.postId
+    }, {
+      type: Report.getCurrentBizType(PlayType.postEditor)
+    });
     emits("postPublishFinish", { publishRes: params.publishRes });
 }