nieyuge 2 lat temu
rodzic
commit
76d32354ec

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

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

+ 12 - 1
src/view/iframe/nft/group-card.vue

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