|
@@ -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
|
|
|
}
|
|
|
})
|
|
|
-}
|
|
|
+}
|