nieyuge 2 anos atrás
pai
commit
a6116c0ca8
2 arquivos alterados com 6 adições e 3 exclusões
  1. 4 1
      src/logic/content/nft.js
  2. 2 2
      src/logic/content/twitter.js

+ 4 - 1
src/logic/content/nft.js

@@ -1,7 +1,7 @@
 import { getOffsetRect, nextTick } from '@/uilts/help'
 import { listJoinNftGroup } from '@/http/nft';
 import { getChromeStorage } from '@/uilts/chromeExtension.js'
-import { _setPublishContent, publishNFTTweetPost } from './twitter';
+import { _setPublishContent, publishNFTTweetPost, bindTwitterArt, bindTwitterArtMethod } from './twitter';
 import { jumpTwitterDetailByAlert } from '@/logic/content/help/twitter.js'
 
 var ifShowNftGroup = false;
@@ -206,6 +206,9 @@ function _addTweetButtonListen() {
 function _postTweetContent() {
     if (tempNftGroupPost && tempNftGroupPost.groupId) {
         publishNFTTweetPost(tempNftGroupPost)
+        bindTwitterArt.needBind = true;
+        bindTwitterArt.postId = tempNftGroupPost.postId;
+        bindTwitterArtMethod();
         // 非首页处理
         let homeTag = document.querySelectorAll('div[data-testid="toolBar"]');
         if (homeTag.length === 1) {

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

@@ -193,7 +193,7 @@ function getUserInfo(cb) {
 }
 
 // 绑定推文id所需参数
-let bindTwitterArt = {
+export let bindTwitterArt = {
     needBind: false,
     postId: '',
     isBindIng: false
@@ -636,7 +636,7 @@ function checkHasDeBtn() {
 /**
  * 点击发推,后端绑定推特id
  */
-function bindTwitterArtMethod() {
+export function bindTwitterArtMethod() {
     if (!bindTwitterArt.postId) {
         return
     }