Ver Fonte

[edit] feature

wenliming há 2 anos atrás
pai
commit
477bac2515

BIN
src/assets/img/icon-group-tab-item.png


Diff do ficheiro suprimidas por serem muito extensas
+ 10 - 0
src/assets/img/img-pined-guide-new-2.svg


BIN
src/assets/img/img-pined-guide-new.png


Diff do ficheiro suprimidas por serem muito extensas
+ 6 - 0
src/assets/svg/icon-celebration.svg


+ 4 - 0
src/assets/svg/icon-joined-group-logo.svg

@@ -0,0 +1,4 @@
+<svg width="32" height="30" viewBox="0 0 32 30" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M15.9464 28.5523L16.0002 28.6076L16.0539 28.5523L31.0538 13.1124L31.0987 13.0661L31.0597 13.0147L23.4185 2.95464L23.396 2.925H23.3588H8.64124H8.60403L8.58152 2.95464L0.940275 13.0147L0.901262 13.0661L0.946206 13.1124L15.9464 28.5523ZM28.8923 12.9257L16.0002 26.1958L3.108 12.9257L9.40121 4.64043H22.5988L28.8923 12.9257Z" fill="#1D9BF0" stroke="#1D9BF0" stroke-width="0.15"/>
+<path d="M16.8074 12.7008C17.1973 12.3323 17.5094 11.8893 17.7252 11.398C17.941 10.9068 18.0561 10.3773 18.0639 9.84079C18.0721 9.30434 17.9728 8.77168 17.7716 8.2743C17.5705 7.77691 17.2716 7.32491 16.8928 6.94501C17.2274 6.8184 17.5823 6.75364 17.94 6.75391C19.6031 6.75391 20.9528 8.13541 20.9528 9.84079C20.9528 11.5459 19.6037 12.9277 17.94 12.9277C17.5516 12.9277 17.1661 12.8512 16.8074 12.7008ZM18.2377 13.9567H19.3212C21.4695 13.9567 23.2097 15.741 23.2097 17.9438V18.2019C23.2097 18.899 22.0842 19.0577 20.5271 19.0925C20.6015 18.9758 20.6399 18.841 20.6375 18.702V18.3677C20.6421 17.4897 20.4244 16.6249 20.0048 15.8536C19.5852 15.0824 18.9773 14.4299 18.2377 13.9567ZM13.8241 6.75391C15.4869 6.75391 16.8353 8.13541 16.8353 9.84079C16.8353 11.5459 15.4884 12.9277 13.8241 12.9277C12.1616 12.9277 10.8119 11.5459 10.8119 9.84079C10.8119 8.13541 12.1616 6.75391 13.8241 6.75391ZM12.6944 13.9567H15.2041C17.3527 13.9567 19.0938 15.741 19.0938 17.9438V18.2019C19.0938 19.0687 17.3512 19.1032 15.2041 19.1032H12.6944C10.5461 19.1032 8.80469 19.1014 8.80469 18.2019V17.9438C8.80469 15.7419 10.5458 13.9567 12.6944 13.9567Z" fill="#1D9BF0"/>
+</svg>

+ 7 - 6
src/entry/content.js

@@ -26,7 +26,9 @@ import {
     showPopupPage,
     showPopupPage,
     setPopupConfByPopupPage,
     setPopupConfByPopupPage,
     setTabGroupIframeStyle,
     setTabGroupIframeStyle,
-    loginSuccessHandle
+    loginSuccessHandle,
+    pageJumpHandler,
+    getTweetProfileNavTop
 } from "@/logic/content/twitter.js";
 } from "@/logic/content/twitter.js";
 
 
 import { 
 import { 
@@ -137,11 +139,10 @@ chrome.runtime.onMessage.addListener((req, sender, sendResponse) => {
             setTabGroupIframeStyle(req.data);
             setTabGroupIframeStyle(req.data);
             break
             break
         case 'IFREME_TAB_GROUP_CONTENT_GET_NAV_TOP':
         case 'IFREME_TAB_GROUP_CONTENT_GET_NAV_TOP':
-            let top = document.querySelector('nav[aria-label="Profile timelines"]').getBoundingClientRect().top;
+            getTweetProfileNavTop(req.data);
-            chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_GROUP_NAV_TOP", data: {
+        case 'IFRAME_PAGE_JUMP':
-                top,
+            pageJumpHandler(req.data);
-                scrollTop: req.data.scrollTop
+            break;
-            } }, () => { })
         case 'BG_LOGIN_SET_USERINFO_CB':
         case 'BG_LOGIN_SET_USERINFO_CB':
             loginSuccessHandle();
             loginSuccessHandle();
             break;
             break;

+ 17 - 0
src/http/nft.js

@@ -55,3 +55,20 @@ export function prePost(params) {
         data: params
         data: params
     })
     })
 }
 }
+
+
+export function getGroupPostList(params) {
+    return service({
+        url: `/nft/group/post/list`,
+        method: 'post',
+        data: params
+    })
+}
+
+export function getTwitterNftGroupInfo(params) {
+    return service({
+        url: `/nft/group/getTwitterNftGroupInfo`,
+        method: 'post',
+        data: params
+    })
+}

+ 5 - 0
src/iframe/joined-group-list.js

@@ -0,0 +1,5 @@
+import { createApp } from 'vue'
+import App from '@/view/iframe/tab-group/joined-group-list.vue'
+
+const app = createApp(App);
+app.mount('#app');

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

@@ -102,4 +102,30 @@ export const setNFTGroupContent = (res) => {
         // document.execCommand('selectAll');
         // document.execCommand('selectAll');
         // document.execCommand("insertText", false, res.srcContent);
         // document.execCommand("insertText", false, res.srcContent);
     })
     })
-}
+}
+
+
+export const addJoinedGroupList = () => {
+    if(ifShowNftGroup) {
+        let {pathname} = window.location;
+
+        let iframe = document.createElement('iframe');
+            iframe.id = 'de-joined-group-list';
+            iframe.src = chrome.runtime.getURL('/iframe/joined-group-list.html');
+            iframe.style.cssText = `border: medium none;width: 350px;height: 321px;border-radius: 16px;margin-bottom: 16px`
+
+        let iframeContent = document.getElementById('de-joined-group-list');
+
+        if (!iframeContent && pathname == '/home') {
+            let sidebarColumn = document.querySelector('div[data-testid="sidebarColumn"]');
+            if(sidebarColumn) {
+                let searchDom = sidebarColumn.querySelector('form[role="search"]');
+                if(searchDom) {
+                    let listWrapperDom = searchDom.parentElement.parentElement.parentElement.parentElement;
+                    let listParent = listWrapperDom.parentElement;
+                    listParent.insertBefore(iframe, listWrapperDom.nextElementSibling.nextElementSibling);
+                }
+            } 
+        }
+    }
+};

+ 64 - 22
src/logic/content/twitter.js

@@ -4,7 +4,7 @@ import { discordAuthRedirectUri } from '@/http/configAPI'
 import { reportSrcPublishEvent } from '@/http/publishApi'
 import { reportSrcPublishEvent } from '@/http/publishApi'
 import Report from "@/log-center/log"
 import Report from "@/log-center/log"
 import { fetchAddFinishEvent } from '@/logic/background/fetch/facebook';
 import { fetchAddFinishEvent } from '@/logic/background/fetch/facebook';
-import { showNFTGroupIcon, hideNFTGroupList, checkUserJoinGroup } from '@/logic/content/nft';
+import { showNFTGroupIcon, hideNFTGroupList, checkUserJoinGroup, addJoinedGroupList } from '@/logic/content/nft';
 
 
 let dom = {};
 let dom = {};
 
 
@@ -768,6 +768,7 @@ function initParseCard() {
                 changeQueueNum(-1)
                 changeQueueNum(-1)
                 showNFTCard()
                 showNFTCard()
                 addGroupTab();
                 addGroupTab();
+                addJoinedGroupList();
             }, 1000)
             }, 1000)
         } else if (inFacebook && inFacebookNode) {
         } else if (inFacebook && inFacebookNode) {
             clearInterval(timer)
             clearInterval(timer)
@@ -819,6 +820,7 @@ export function init() {
     checkTwitterTaskState();
     checkTwitterTaskState();
     initBuyNFT();
     initBuyNFT();
     addGroupTab();
     addGroupTab();
+    addJoinedGroupList();
 
 
     getChromeStorage("popupShowPublishDialog", (res) => {
     getChromeStorage("popupShowPublishDialog", (res) => {
         console.log("popupShowPublishDialog", res);
         console.log("popupShowPublishDialog", res);
@@ -1495,13 +1497,23 @@ export const setPopupConfByPopupPage = () => {
 
 
 /** 
 /** 
  * 
  * 
- * Group Tab List start 
+ * Group Tab List Start 
  */
  */
 
 
 const addGroupTab = () => {
 const addGroupTab = () => {
     let tabListDom = document.querySelector('div[role="tablist"]');
     let tabListDom = document.querySelector('div[role="tablist"]');
     let groupItemTab = document.querySelector('#de-nav-tab-group');
     let groupItemTab = document.querySelector('#de-nav-tab-group');
 
 
+    let groupIcon = document.createElement('img');
+    groupIcon.id = 'de-group-tab-icon'
+    groupIcon.src = require("@/assets/img/icon-group-tab-item.png");
+    groupIcon.style.cssText = 'width:20px;height: 20px;margin-right:4px;';
+
+    let divNode = document.createElement('div');
+    divNode.style.cssText = 'display: flex; align-items: center';
+    divNode.appendChild(groupIcon);
+    divNode.appendChild(document.createTextNode('Group'));
+
     if(tabListDom && !groupItemTab) {
     if(tabListDom && !groupItemTab) {
         let lineDom = document.createElement('div');
         let lineDom = document.createElement('div');
         lineDom.id = 'de-tab-line';
         lineDom.id = 'de-tab-line';
@@ -1515,7 +1527,6 @@ const addGroupTab = () => {
             display: none`;
             display: none`;
 
 
         let groupTab = document.createElement('div');
         let groupTab = document.createElement('div');
-        groupTab.innerHTML = `Group`;
         groupTab.id = 'de-nav-tab-group';
         groupTab.id = 'de-nav-tab-group';
         groupTab.style.cssText = `z-index: 1;
         groupTab.style.cssText = `z-index: 1;
             position: relative;
             position: relative;
@@ -1532,6 +1543,8 @@ const addGroupTab = () => {
             height: 53px;
             height: 53px;
             cursor: pointer;
             cursor: pointer;
             font: 500 15px / 20px TwitterChirp, -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;`;
             font: 500 15px / 20px TwitterChirp, -apple-system, "system-ui", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;`;
+
+        groupTab.appendChild(divNode);
         groupTab.appendChild(lineDom);
         groupTab.appendChild(lineDom);
         tabListDom.appendChild(groupTab);
         tabListDom.appendChild(groupTab);
 
 
@@ -1550,8 +1563,32 @@ const addGroupTab = () => {
     });
     });
 
 
     addTabGroupContent();
     addTabGroupContent();
+    checkNeedSelectGroupTab();
 }
 }
 
 
+/**
+ * 跳转到个人主页 检查是否需要选中 Group tab
+ */
+const checkNeedSelectGroupTab = () => {
+    if(window.location.pathname != '/home') {
+        setTimeout(() => {
+            const urlParams = new URLSearchParams(window.location.search);
+            const deTabVal = urlParams.get('deTabVal');
+            if (deTabVal == 'deGroupTab') {
+                selectGroupTab();
+            }
+        }, 500)
+    }
+}
+
+/** 选中 Group tab */
+const selectGroupTab = () => {
+    let groupTab = document.querySelector('#de-nav-tab-group');
+    if(groupTab) {
+        groupTab.click();
+    }
+};
+
 /**
 /**
  * 
  * 
  * Group tab点击事件监听
  * Group tab点击事件监听
@@ -1678,11 +1715,6 @@ const setTabContentStyle = (params) => {
         } else {
         } else {
             tweetTabContent.style.display = tweetTabContentDisply;
             tweetTabContent.style.display = tweetTabContentDisply;
         }
         }
-    } else {
-        tweetTabContent = document.querySelector('div[data-testid="emptyState"]');
-        if(tweetTabContent) {
-            tweetTabContent.style.display = tweetTabContentDisply;
-        }
     }
     }
 
 
     let iframeContent = document.getElementById('de-tab-group-content');
     let iframeContent = document.getElementById('de-tab-group-content');
@@ -1703,7 +1735,7 @@ const setTabContentStyle = (params) => {
  * 获取 twitter tab 下的内容
  * 获取 twitter tab 下的内容
  */
  */
 const getTweetTabContent = () => {
 const getTweetTabContent = () => {
-    let tweetTabContent = document.querySelector('[data-testid="primaryColumn"] [role="navigation"] + * > div[aria-label]:not([role="progressbar"])');
+    let tweetTabContent = document.querySelector('[data-testid="primaryColumn"] [role="navigation"] + * > div[aria-label]:not([role="progressbar"])') || document.querySelector('div[data-testid="emptyState"]');
     return tweetTabContent;
     return tweetTabContent;
 }
 }
 
 
@@ -1711,9 +1743,12 @@ const getTweetTabContent = () => {
  * 注入 Group List 内容
  * 注入 Group List 内容
  */
  */
 const addTabGroupContent = () => {
 const addTabGroupContent = () => {
+    let params = {
+        windowLocation: window.location
+    }
     let iframe = document.createElement('iframe');
     let iframe = document.createElement('iframe');
         iframe.id = 'de-tab-group-content';
         iframe.id = 'de-tab-group-content';
-        iframe.src = chrome.runtime.getURL('/iframe/tab-group.html');
+        iframe.src = chrome.runtime.getURL('/iframe/tab-group.html') + `?params=${JSON.stringify(params)}`;
         iframe.style.cssText = `border: medium none; height: 500px;display: none`
         iframe.style.cssText = `border: medium none; height: 500px;display: none`
 
 
     let iframeContent = document.getElementById('de-tab-group-content');
     let iframeContent = document.getElementById('de-tab-group-content');
@@ -1722,11 +1757,6 @@ const addTabGroupContent = () => {
     if (!iframeContent) {
     if (!iframeContent) {
         if(tweetTabContent && tweetTabContent.parentElement) {
         if(tweetTabContent && tweetTabContent.parentElement) {
             tweetTabContent.parentElement.appendChild(iframe);
             tweetTabContent.parentElement.appendChild(iframe);
-        } else {
-            tweetTabContent = document.querySelector('div[data-testid="emptyState"]');
-            if(tweetTabContent && tweetTabContent.parentElement) {
-                tweetTabContent.parentElement.appendChild(iframe);
-            }
         }
         }
     }
     }
 };
 };
@@ -1736,24 +1766,36 @@ const addTabGroupContent = () => {
  * 设置Tab Group Iframe 样式
  * 设置Tab Group Iframe 样式
  */
  */
 export const setTabGroupIframeStyle = (params) => {
 export const setTabGroupIframeStyle = (params) => {
-    let {height = 0} = params;
+    let iframeContent = document.getElementById('de-tab-group-content');
-    // if(height > 0) {
+    iframeContent.style.height =  document.querySelector('html').offsetHeight + 'px';
-        let iframeContent = document.getElementById('de-tab-group-content');
+}
-        // iframeContent.style.height = height + 'px';
+
-        iframeContent.style.height =  document.querySelector('html').offsetHeight + 'px';
+export const pageJumpHandler = (params) => {
-    // }
+    let {url, name = '_self'} = params
+    window.open(url, name)
 }
 }
 
 
+export const getTweetProfileNavTop = (params) => {
+    let top = document.querySelector('div[role="tablist"]').closest('nav').getBoundingClientRect().top;
+
+    chrome.runtime.sendMessage({ actionType: "CONTENT_SEND_GROUP_NAV_TOP", data: {
+        top,
+        scrollTop: params.scrollTop
+    } }, () => { })
+} 
+
 /** 
 /** 
  * 
  * 
- * Group Tab List end 
+ * Group Tab List End 
  * 
  * 
  */
  */
 
 
+
 export const loginSuccessHandle = () => {
 export const loginSuccessHandle = () => {
     // 检查是否漏出group图标
     // 检查是否漏出group图标
     checkUserJoinGroup(() => {
     checkUserJoinGroup(() => {
         showNFTGroupIcon()
         showNFTGroupIcon()
         addEventAction()
         addEventAction()
+        addJoinedGroupList();
     })
     })
 }
 }

+ 2 - 1
src/manifest.json

@@ -71,7 +71,8 @@
                 "/iframe/nft-group.html",
                 "/iframe/nft-group.html",
                 "/iframe/buy-nft.html",
                 "/iframe/buy-nft.html",
                 "/iframe/popup-page.html",
                 "/iframe/popup-page.html",
-                "/iframe/tab-group.html"
+                "/iframe/tab-group.html",
+                "/iframe/joined-group-list.html"
             ],
             ],
             "matches": [
             "matches": [
                 "<all_urls>"
                 "<all_urls>"

+ 38 - 2
src/view/components/nft-group-list.vue

@@ -5,16 +5,28 @@
             :key="index"
             :key="index"
             v-for="(item, index) in detail"
             v-for="(item, index) in detail"
             @click="clickHandler(item)">
             @click="clickHandler(item)">
-            <div class="logo"><img :src="item.nftGroupIcon" /></div>
+            <div class="logo">
+                <img :src="item.nftGroupIcon" />
+                <div class="badge" v-if="showBadge">
+                    {{item.newPostCount}}
+                </div>
+            </div>
             <div class="text">{{item.nftGroupName}}</div>
             <div class="text">{{item.nftGroupName}}</div>
         </div>
         </div>
     </div>
     </div>
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { onBeforeMount, ref, defineEmits } from 'vue'
+import { onBeforeMount, ref, defineEmits, defineProps } from 'vue'
 import { listJoinNftGroup } from '@/http/nft'
 import { listJoinNftGroup } from '@/http/nft'
 
 
+const props = defineProps({
+    showBadge: {
+        type: Boolean,
+        default: false,
+    }
+})
+
 let pageNum = 1;
 let pageNum = 1;
 let pageSize = 1000;
 let pageSize = 1000;
 let detail = ref(null);
 let detail = ref(null);
@@ -47,6 +59,7 @@ body {
 }
 }
 
 
 .list {
 .list {
+    overflow-y: auto;
     .item {
     .item {
         display: flex;
         display: flex;
         height: 48px;
         height: 48px;
@@ -61,11 +74,34 @@ body {
             border-radius: 6px;
             border-radius: 6px;
             background: #FFFFFF;
             background: #FFFFFF;
             margin-right: 16px;
             margin-right: 16px;
+            position: relative;
+
             img {
             img {
                 width: 100%;
                 width: 100%;
                 height: 100%;
                 height: 100%;
                 border-radius: 6px;
                 border-radius: 6px;
             }
             }
+
+            .badge {
+                min-width: 16px;
+                min-height: 16px;
+                padding: 0 4px;
+                font-weight: 600;
+                font-size: 12px;
+                color: #fff;
+                background: #1D9BF0;
+                border: 1px solid #F7F9F9;
+                border-radius: 100px;
+                box-sizing: border-box;
+                position: absolute;
+                top: -8px;
+                left: 29px;
+                min-width: 18px;
+                min-height: 18px;
+                display: flex;
+                align-items: center;
+                justify-content: center;
+            }
         }
         }
         .text {
         .text {
             display: flex;
             display: flex;

+ 77 - 0
src/view/iframe/tab-group/joined-group-list.vue

@@ -0,0 +1,77 @@
+<template>
+    <div class="group-list-page" ref="pageWrapperDom">
+        <div class="title">
+            <img class="icon" :src="require('@/assets/svg/icon-joined-group-logo.svg')" >
+            NFT Owners Group
+        </div>
+        <div class="content-wrapper">
+            <nft-group-list style="height: 100%" :showBadge="true" @clickCallBack="clickHandler"></nft-group-list>
+        </div>
+    </div>
+</template>
+
+<script setup>
+import { onMounted, ref, watch } from "vue";
+import NftGroupList from '@/view/components/nft-group-list.vue';
+
+const clickHandler = (params) => {
+    let url = `https://twitter.com/${params.defaultTwitterAccount}?deTabVal=deGroupTab`;
+    sendMessageToContent({
+        actionType: 'IFRAME_PAGE_JUMP',
+        data: {
+            url
+        }
+    })
+}
+
+const sendMessageToContent = (params) => {
+    let {actionType, data} = params || {};
+    chrome.tabs.getCurrent((tab) => {
+        chrome.tabs.sendMessage(tab.id, {
+        actionType,
+        data,
+        }, (res) => { console.log(res) });
+    })
+}
+
+onMounted(() => {
+}) 
+</script>
+
+<style  lang="scss">
+html, body, #app {
+    width: 100%;
+    height: 100%;
+    margin: 0;
+    padding: 0;
+}
+
+.group-list-page {
+    height: 100%;
+    overflow-y: auto;
+    background: #F7F9F9;
+
+    padding: 0 16px;
+    box-sizing: border-box;
+
+    .title {
+        font-weight: 800;
+        font-size: 18px;
+        box-sizing: border-box;
+        height: 56px;
+        display: flex;
+        align-items: center;
+
+        .icon {
+            margin-right: 8px;
+        }
+
+    }
+    .content-wrapper {
+        height: calc(100% - 60px);
+        overflow-y: auto;
+        padding-left: 4px;
+        box-sizing: border-box;
+    }
+}
+</style>

+ 67 - 94
src/view/iframe/tab-group/tab-group.vue

@@ -21,9 +21,9 @@
                                     <div class="nft-desc">
                                     <div class="nft-desc">
                                         <div v-html="item.nftItem.metadata.description"></div>
                                         <div v-html="item.nftItem.metadata.description"></div>
                                     </div>
                                     </div>
-                                    <div class="nft-date">
+                                    <!-- <div class="nft-date">
                                         {{item.nftItem.dateOfPossession}}
                                         {{item.nftItem.dateOfPossession}}
-                                    </div>
+                                    </div> -->
                                 </div>
                                 </div>
                             </div>
                             </div>
                         </div>
                         </div>
@@ -34,9 +34,7 @@
                             {{item.screenName}}
                             {{item.screenName}}
                         </div>
                         </div>
                     </div>
                     </div>
-                    <div class="post-content">
+                    <div class="post-content" v-html="item.textContent"></div>
-                        {{item.textContent}}
-                    </div>
                 </div>
                 </div>
             </div>
             </div>
         </div>
         </div>
@@ -44,101 +42,33 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { onMounted, ref, watch } from "vue";
+import { onMounted, ref } from "vue";
+import { getGroupPostList, getTwitterNftGroupInfo } from '@/http/nft'
+import { getQueryString } from '@/uilts/help.js'
+
+let twitterAccount = '';
+let groupInfo = {};
+
 let listData = ref([])
 let listData = ref([])
 let listWrapperDom = ref(null);
 let listWrapperDom = ref(null);
 let pageWrapperDom = ref(null);
 let pageWrapperDom = ref(null);
 
 
 let listReqParams = {
 let listReqParams = {
     params: {
     params: {
-        pageNum: 1,
         pageSize: 100,
         pageSize: 100,
+        preTimestamp: ''
     },
     },
     loadMore: false,
     loadMore: false,
 };
 };
 
 
 const clickItem = (data, index) => {
 const clickItem = (data, index) => {
-    let url = `twitter.com/${data.screenName}/status/${data.srcContentId}`;
+    let url = `https://twitter.com/${data.screenName}/status/${data.srcContentId}`;
-}
+    sendMessageToContent({
-
+        actionType: 'IFRAME_PAGE_JUMP',
-watch(
+        data: {
-    () => listData,
+            url
-    (newVal) => {
-        setTimeout(() => {
-            console.log(listWrapperDom.value.offsetHeight);
-            if(listWrapperDom.value && listWrapperDom.value.offsetHeight > 1) {
-                
-            }
-        }, 500)
-    },
-    {
-        deep: true
-    }
-);
-
-let itemData = {
-      "avatarUrl": "https://pbs.twimg.com/profile_images/1534854907836043266/gVFuSGKE_400x400.jpg",
-      "createTimestamp": 0,
-      nftItem: {
-        "dateOfPossession": "string",
-        "details": {
-          "blockChain": "string",
-          "contractAddress": "string",
-          "contractAddressUrl": "string",
-          "creatorFees": "string",
-          "tokenId": "string",
-          "tokenIdUrl": "string",
-          "tokenStandard": "string",
-          "transactionRoyalties": "string"
-        },
-        "imagePath": "https://img2.baidu.com/it/u=2343388762,2916277035&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
-        "metadata": {
-            description: '<div>desc</div>'
-        },
-        "nftItemId": 0,
-        "nftItemName": "string",
-        "nftProjectId": "string",
-        "purchasePrice": "string",
-        "saleCurrencyCode": "string",
-        "salePrice": "string"
-      },
-      "nickName": "string",
-      "postId": "string",
-      "screenName": "string",
-      "srcContentId": "string",
-      "textContent": `罗永浩 72 年的,就比我大两岁
-
-看到他演完「真还传」又要去演「最美不过夕阳红」
-
-还是很感动的
-
-于是我也决定淡推几个月
-
-新的事情没赚钱之前,先低调点
-
-各位保重,等我赚到钱回来教大家`,
-      "uid": 0
-    };
-
-const addData = () => {
-    setTimeout(() => {
-        let list = [];
-        for(let i = 0; i < 50; i++){
-            list.push(itemData)
-        }
-        let data = listData.value.concat(list);
-        listData.value = data;
-    }, 800)
-}
-
-const setListData = () => {
-    setTimeout(() => {
-        let list = [];
-        for(let i = 0; i < 50; i++){
-            list.push(itemData)
         }
         }
-        listData.value = list;
+    })
-    }, 800)
 }
 }
 
 
 function onRuntimeMsg() {
 function onRuntimeMsg() {
@@ -159,7 +89,6 @@ function onRuntimeMsg() {
 
 
 const nextPage = (params) => {
 const nextPage = (params) => {
     let {wrapperHeight, wrapperScrollTop, contentHeight} = params;
     let {wrapperHeight, wrapperScrollTop, contentHeight} = params;
-    // console.log(wrapperHeight+wrapperScrollTop, contentHeight,  wrapperHeight + wrapperScrollTop >= (contentHeight - 100))
     if (wrapperHeight + wrapperScrollTop >= (contentHeight - 50)) {
     if (wrapperHeight + wrapperScrollTop >= (contentHeight - 50)) {
         console.log('next---');
         console.log('next---');
         if(pageWrapperDom.value && pageWrapperDom.value.style.overflowY != 'auto') {
         if(pageWrapperDom.value && pageWrapperDom.value.style.overflowY != 'auto') {
@@ -200,11 +129,12 @@ const innerPageNext = (data) => {
         listReqParams.loadMore === false &&
         listReqParams.loadMore === false &&
         wrapperHeight + scrollTop >= (listContentHeight - 100)
         wrapperHeight + scrollTop >= (listContentHeight - 100)
     ) {
     ) {
-        console.log('next---111');
         listReqParams.loadMore = true;
         listReqParams.loadMore = true;
-        listReqParams.params.pageNum++;
+        let dataLength = listData.value.length;
-        addData();
+        if(dataLength) {
-        // getCurrencyInfoList();
+            listReqParams.params.preTimestamp = listData.value[dataLength - 1]['createTimestamp'];
+        }
+        getListData();
     }
     }
 }
 }
 
 
@@ -218,9 +148,50 @@ const sendMessageToContent = (params) => {
     })
     })
 }
 }
 
 
+const getListData = () => {
+    getGroupPostList({
+        params: {
+            pageSize: listReqParams.params.pageSize,
+            preTimestamp: listReqParams.params.preTimestamp,
+            groupId: groupInfo.nftGroupId
+        }
+    }).then(res => {
+        if (res.code == 0) {
+            let resData = res.data;
+            if (resData.length) {
+                if (!listReqParams.params.preTimestamp) {
+                    listData.value = resData;
+                } else {
+                    let data = dataList.value;
+                    data = data.concat(resData);
+                    listData.value = data;
+                }
+                listReqParams.loadMore = false;
+            }
+        }
+    })
+}
+
 onMounted(() => {
 onMounted(() => {
     onRuntimeMsg();
     onRuntimeMsg();
-    setListData();
+    let {windowLocation} = JSON.parse(getQueryString('params'));
+    console.log('windowLocation', windowLocation)
+    if(windowLocation.pathname) {
+        twitterAccount = windowLocation.pathname.split('/')[1];
+        if(twitterAccount) {
+            getTwitterNftGroupInfo({
+                params: {
+                    twitterAccount
+                }
+            }).then(res => {
+                if(res.code == 0) {
+                    groupInfo = res.data;
+                    getListData()
+                }
+            })
+        }
+    }
+
 
 
     sendMessageToContent({
     sendMessageToContent({
         actionType: "IFREME_TAB_GROUP_SET_IFRAME_HEIGHT",
         actionType: "IFREME_TAB_GROUP_SET_IFRAME_HEIGHT",
@@ -339,7 +310,7 @@ html, body, #app {
                                 margin-bottom: 6px;
                                 margin-bottom: 6px;
                             }
                             }
                             .nft-desc {
                             .nft-desc {
-                                margin-bottom: 18px;
+                                // margin-bottom: 18px;
                             }
                             }
                             .nft-date {
                             .nft-date {
                                 font-weight: 500;
                                 font-weight: 500;
@@ -356,6 +327,8 @@ html, body, #app {
                     line-height: 24px;
                     line-height: 24px;
                     color: rgb(15, 20, 25);
                     color: rgb(15, 20, 25);
                     font-family: TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
                     font-family: TwitterChirp, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
+                    word-break: break-all;
+                    white-space: pre-line;
                 }
                 }
             }
             }
         }
         }

+ 6 - 6
src/view/popup/tabbar-page/more/index.vue

@@ -31,18 +31,18 @@ let moreTabList = ref([
   {
   {
     icon: require("@/assets/svg/icon-website.svg"),
     icon: require("@/assets/svg/icon-website.svg"),
     label: "Official Website",
     label: "Official Website",
-    href: "https://denet.me",
+    href: "https://www.denet.me",
   },
   },
   {
   {
     icon: require("@/assets/svg/icon-twitter.svg"),
     icon: require("@/assets/svg/icon-twitter.svg"),
     label: "Twitter",
     label: "Twitter",
     href: "https://twitter.com/denet2022",
     href: "https://twitter.com/denet2022",
   },
   },
-  {
+  // {
-    icon: require("@/assets/svg/icon-discord.svg"),
+  //   icon: require("@/assets/svg/icon-discord.svg"),
-    label: "Discord",
+  //   label: "Discord",
-    href: "https://discord.gg/wZSz9p8ddG",
+  //   href: "https://discord.gg/wZSz9p8ddG",
-  },
+  // },
   {
   {
       icon: require("@/assets/svg/icon-telegram.svg"),
       icon: require("@/assets/svg/icon-telegram.svg"),
       label: "Telegram",
       label: "Telegram",

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff