Browse Source

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

# Conflicts:
#	src/view/iframe/nft/group-card.vue
wenliming 2 years ago
parent
commit
92654b8a2a

+ 3 - 0
src/logic/background/twitter.js

@@ -281,6 +281,9 @@ export function onInstalledCreateTab() {
                     getChromeCookie(nftGroupParams, (res) => {
                         let { twitterAccount } = res;
                         if (res && twitterAccount) {
+                            setChromeStorage({ groupTabData: JSON.stringify({
+                                deTabVal: 'deGroupTab'
+                            })})
                             let url = `https://twitter.com/${twitterAccount}`
                             chrome.tabs.create({
                                 url

+ 3 - 3
src/logic/content/nft.js

@@ -93,7 +93,7 @@ export const clearPostContent = (fn) => {
             if (inputEle) {
                 inputEle.focus();
             }
-        }, 100).then(() => {
+        }, 20).then(() => {
             document.execCommand('selectAll');
             document.execCommand('delete');
             clearPostContent(fn)
@@ -129,7 +129,7 @@ export const setNFTGroupContent = (res) => {
         setPostContent(res)
         nextTick(() => {
             _addTweetButtonListen()
-        }, 200)
+        }, 100)
         
     } else {
         clearPostContent(() => {
@@ -140,7 +140,7 @@ export const setNFTGroupContent = (res) => {
             setPostContent(res)
             nextTick(() => {
                 _addTweetButtonListen()
-            }, 200)
+            }, 100)
         })
     }
 }

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

@@ -780,10 +780,10 @@ function initParseCard() {
                     onChangePageMain(inTwitterNode)
                     changeQueueNum(1)
                 }
+                showNFTGroupIcon()
                 if (queue_num <= 0) {
                     return
                 }
-                showNFTGroupIcon()
                 setIframeRedPacket()
                 checkHasDeBtn()
                 checkHasSliderDeBtn();

+ 15 - 4
src/view/iframe/nft/group-card.vue

@@ -40,10 +40,21 @@ let tweet_Id = getQueryString('tweet_Id')
 let detail = ref(null);
 
 const jumpUserPage = () => {
-    setChromeStorage({ groupTabData: JSON.stringify({
-        deTabVal: 'deGroupTab'
-    })})
-    window.open(`https://twitter.com/${detail.value.defaultTwitterAccount}`)
+    getChromeStorage('userInfo', (_userInfo) => {
+        if (!_userInfo) {
+            chrome.runtime.sendMessage(
+                { actionType: "POPUP_LOGIN", data: "" },
+                (response) => {
+                    console.log("res", response);
+                }
+            )
+        } else {
+            setChromeStorage({ groupTabData: JSON.stringify({
+                deTabVal: 'deGroupTab'
+            })})
+            window.open(`https://twitter.com/${detail.value.defaultTwitterAccount}`)
+        }
+    })
 }
 // 重新绑定
 const reSetBindTwtterId = (_params = {}) => {