Browse Source

[edit][修改弹窗信息错误]

zhangwei 3 năm trước cách đây
mục cha
commit
6d0c918bb4
2 tập tin đã thay đổi với 5 bổ sung8 xóa
  1. 2 6
      src/logic/content/twitter.js
  2. 3 2
      src/view/iframe/group-card/card.vue

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

@@ -1773,12 +1773,8 @@ const getGroupTabNode = () => {
 }
 
 const addGroupTab = () => {
-    let illegalPages = ['notifications', 'explore', 'followers', 'following'];
-    let page = window.location.pathname.split('/');
-    if (page && page.length) {
-        if (illegalPages.indexOf(page[page.length - 1]) > -1) {
-            return;
-        }
+    if (!document.querySelector('div[data-testid=UserName]')) {
+        return
     }
     let tabListDom = document.querySelector('div[role="tablist"]');
     let groupItemTab = getGroupTabNode();

+ 3 - 2
src/view/iframe/group-card/card.vue

@@ -47,7 +47,7 @@
 </template>
 
 <script setup>
-import { reactive, onMounted } from 'vue'
+import { reactive, onBeforeMount } from 'vue'
 import { getTwitterNftGroupInfo } from "@/http/group";
 import { getQueryString } from '@/uilts/help.js';
 import { sendChromeTabMessage, checkIsLogin } from '@/uilts/chromeExtension.js';
@@ -198,11 +198,12 @@ async function clickPost() {
 }
 
 
-onMounted(() => {
+onBeforeMount(() => {
     state.twitterAccount = getQueryString('twitterAccount') || ''
     init(() => {
         sendChromeTabMessage({ actionType: "IFRAME_SHOW_GROUP_TIP" })
     })
+
 })
 </script>