A\An 2 rokov pred
rodič
commit
e0c0c07e13

+ 9 - 1
src/log-center/logEnum.js

@@ -17,6 +17,14 @@ export const objectType = {
     loginButton: "login-button",
     withdrawButton: "withdraw-button",
     topupButton: "topup-button",
+
+    //discord 
+    getDiscordGuildNoData: 'get-discord-guild-no-data',
+    getDiscordGuildCatch: 'get-discord-guild-catch',
+    getDiscordGuildOpenApiNoData: 'get-discord-guild-openapi-no-data',
+    getDiscordGuildOpenApiCatch: 'get-discord-guild-openapi-catch',
+    saveDiscordGuildData: 'save-discord-guild-data',
+
     // 按钮点击
     open_button: 'open-button',
     // 关注全部
@@ -29,7 +37,7 @@ export const objectType = {
     // 点击检测任务
     get_giveaway: 'get-giveaway',
     // 成功领取到钱包
-    wallet_button: 'wallet-button'
+    wallet_button: 'wallet-button',
 }
 
 export const pageSource = {

+ 11 - 0
src/logic/content/twitter.js

@@ -868,6 +868,8 @@ export function replyHandle(params) {
         let tweetReply = document.querySelector('div[data-testid="tweetButtonInline"]');
         if (tweetReply) {
             tweetReply.addEventListener('click', function () {
+                // 详情页回复按钮点击
+
                 let eleList = tweetReply.parentNode.parentNode.parentNode.parentNode.parentNode.querySelectorAll('span[data-text="true"]');
                 reportReplyResult(eleList, params, () => {
                     // iframe.contentWindow.postMessage({ actionType: 'CONTENT_RED_PACKET_REPLY_RASK_FINSH', data: {} }, '*');
@@ -917,6 +919,9 @@ function onReplyDialogOpen(params, iframe) {
 
         if (dialog && replyBtn) {
             replyBtn.addEventListener('click', function () {
+                // 推文页回复按钮点击
+
+
                 let eleList = dialog.querySelector('div[contenteditable="true"]').querySelectorAll('span[data-text="true"]');
                 reportReplyResult(eleList, params, () => {
                     // 上報完成
@@ -929,6 +934,8 @@ function onReplyDialogOpen(params, iframe) {
 }
 
 const reportReplyResult = throttle(function (eleList, params, cb) {
+    //未过滤的回复文本
+
     if (eleList && eleList.length) {
         let atList = [];
         for (let i = 0; i < eleList.length; i++) {
@@ -941,9 +948,13 @@ const reportReplyResult = throttle(function (eleList, params, cb) {
             }
         }
 
+        // 去重过滤文本
         atList = Array.from(new Set(atList));
 
+
         if (atList.length >= 3) {
+            //真实上报
+
             fetchAddFinishEvent({
                 eventType: params.type,
                 luckdropId: params.taskLuckdropId

+ 1 - 2
src/view/components/popup-transactions.vue

@@ -84,7 +84,7 @@
                                     Giveaways
                                 </template>
                                 <template v-else-if="item.bizType == -3">
-                                    Mystery box*{{item.bizData.nftItemCount}}  Sold
+                                    Mystery box*{{(item.bizData && item.bizData.nftItemCount || '')}}  Sold
                                 </template>
                             </div>
                             <div class="time">{{ moment(item.createTimestamp).format('MM-DD HH:mm:ss') }}</div>
@@ -370,7 +370,6 @@ const listScroll = (e) => {
                 display: flex;
                 justify-content: space-between;
                 align-items: center;
-                border-bottom: 1px solid #ECECEC;
                 box-sizing: border-box;
                 padding: 10px 12px 10px 0;
 

+ 43 - 1
src/view/iframe/publish/give-dialog.vue

@@ -744,6 +744,15 @@ const getPayAmount = async (amountValue) => {
 
 const saveDiscordGuildInfo = () => {
     let {guildId, inviteCode, inviteUrl} = discordInviteInfo.value;
+    //保存服务器信息 
+    Report.reportLog({
+        pageSource: Report.pageSource.publisherDialog,
+        businessType: Report.businessType.buttonClick,
+        objectType: Report.objectType.saveDiscordGuildData
+    }, {
+        reportData: discordInviteInfo.value
+    });
+
     if(guildId && inviteCode && inviteUrl) {
         saveInviteGuildInfo({
             params: {
@@ -1407,9 +1416,25 @@ const getDiscordInviteInfo = ({inviteUrl, getDuildId}, cb) => {
         if(resData.data.guildId) {
             cb && cb(resData);
         } else {
+            //DISCORD 接口未获取到服务器信息 resdata
+            Report.reportLog({
+                pageSource: Report.pageSource.publisherDialog,
+                businessType: Report.businessType.buttonClick,
+                objectType: Report.objectType.getDiscordGuildNoData
+            }, {
+                resData: resData
+            });
             getGuildInfoByOpenApi({inviteCode}, cb);
         }
     }).catch((err) => {
+        //DISCORD 接口 catch 
+        Report.reportLog({
+            pageSource: Report.pageSource.publisherDialog,
+            businessType: Report.businessType.buttonClick,
+            objectType: Report.objectType.getDiscordGuildCatch
+        }, {
+            err: err
+        });
         getGuildInfoByOpenApi({inviteCode}, cb);
     });
 }
@@ -1423,8 +1448,25 @@ const getGuildInfoByOpenApi = (params, cb) => {
         let resData = inviteGuildResHandler(res, {inviteCode, inviteUrl});
         if(resData.data.guildId) {
             cb && cb(resData);
-        } 
+        } else {
+            //OPENAPI 接口未获取到服务器信息 resdata
+            Report.reportLog({
+                pageSource: Report.pageSource.publisherDialog,
+                businessType: Report.businessType.buttonClick,
+                objectType: Report.objectType.getDiscordGuildOpenApiNoData
+            }, {
+                resData: resData
+            });
+        }
     }).catch((err) => {
+        // OPENAPI 接口 catch 限频
+        Report.reportLog({
+            pageSource: Report.pageSource.publisherDialog,
+            businessType: Report.businessType.buttonClick,
+            objectType: Report.objectType.getDiscordGuildOpenApiCatch
+        }, {
+            err: err
+        });
         if(iptErrMsgTxt.value && iptErrType == 'discord') {
             iptErrMsgTxt.value = '';
             iptErrType = '';

+ 1 - 1
src/view/popup/components/head.vue

@@ -18,7 +18,7 @@
                 @click="clickList" />
             <img :src="require('@/assets/svg/icon-refresh.svg')" alt="" class="refresh" v-if="show_refresh"
                 @click="clickRefresh" :class="{ transform_rotate: state.rotate }">
-            <img :src="require('@/assets/svg/icon-withdraw-help.svg')" alt="" class="help" v-if="props.show_help"
+            <img :src="require('@/assets/svg/icon-head-help.svg')" alt="" class="help" v-if="props.show_help"
                 @click="clickHelp">
             <img :src="require('@/assets/svg/icon-more-l.svg')" alt="" class="more" v-if="props.show_more"
                 @click="state.show_option = true">

+ 67 - 43
src/view/popup/components/tabbar.vue

@@ -1,35 +1,34 @@
 <template>
     <div class="tab-bar-wrappeer">
-        <div
-            class="tab-bar-item"
+        <template
             v-for="(item, index) in tabbarData"
-            :key="index"
-            @click="tabbarHandler(item, index)"
-        >
-            <template v-if="item.path != '/NFT' || item.path == '/NFT' && showNFTTab">
-                <red-dot class="red-dots"
-                    v-if="unReadCountTask > 0 && item.path == '/message' && currentTab.path != '/message'"
-                    ></red-dot>
-                <img
-                    :src="
-                        index == currentTab.index
-                            ? item.iconActive
-                            : item.iconInActive
-                    "
-                />
-                <div
-                    class="text"
-                    :class="{ 'active-tab': index == currentTab.index }"
-                >
-                    {{ item.name }}
-                </div>
-            </template>
-        </div>
+            :key="index">
+            <div class="tab-item" 
+                 v-if="item.path != '/NFT' || item.path == '/NFT' && showNFTTab"
+                 @click="tabbarHandler(item, index)">
+                    <red-dot class="red-dots"
+                        v-if="unReadCountTask > 0 && item.path == '/message' && currentTab.path != '/message'"
+                        ></red-dot>
+                    <img
+                        :src="
+                            index == currentTab.index
+                                ? item.iconActive
+                                : item.iconInActive
+                        "
+                    />
+                    <div
+                        class="text"
+                        :class="{ 'active-tab': index == currentTab.index }"
+                    >
+                        {{ item.name }}
+                    </div>
+            </div>
+        </template>
     </div>
 </template>
 
 <script setup>
-import { ref, onMounted, defineEmits, nextTick } from "vue";
+import { ref, onMounted, defineProps, defineEmits, nextTick, watch } from "vue";
 
 import redDot from "@/view/components/red-dot.vue";
 import router from "@/router/popup.js";
@@ -39,6 +38,29 @@ import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
 import { nftListMine } from "@/http/nft.js";
 import { getAllMessageInfo } from "@/http/messageApi"
 
+
+const props = defineProps({
+    userInfo: {
+        type: Object,
+        default: () => {
+            return {
+                accessToken: undefined,
+            };
+        }
+    },
+});
+
+watch(
+    () => props.userInfo,
+    (newVal) => {
+        getNFTListMine();
+    },
+    {
+        deep: true
+    }
+);
+
+
 let currentTab = ref({
     index: 0,
     path: '/'
@@ -106,6 +128,8 @@ const setActiveTab = () => {
 };
 
 const getNFTListMine = () => {
+    console.log(props.userInfo.accessToken)
+    if(!props.userInfo.accessToken) return;
     nftListMine({
         params: NFTReqParams.params,
     }).then((res) => {
@@ -136,7 +160,6 @@ const setMessageCount = () => {
 
 onMounted(() => {
     setActiveTab();
-    getNFTListMine();
 });
 </script>
 
@@ -156,26 +179,27 @@ onMounted(() => {
 
     cursor: pointer;
 
-    .tab-bar-item {
-        flex: 1;
-        text-align: center;
-        position: relative;
+        .tab-item {
+            flex: 1;
+            text-align: center;
+            position: relative;
 
-        .text {
-            font-weight: 500;
-            font-size: 12px;
-            color: #c0c0c0;
-        }
+            .text {
+                font-weight: 500;
+                font-size: 12px;
+                color: #c0c0c0;
+            }
 
-        .active-tab {
-            color: #1d9bf0 !important;
-        }
+            .active-tab {
+                color: #1d9bf0 !important;
+            }
 
-        .red-dots {
-            position: absolute;
-            right: 32%;
-            top: 0px;
+            .red-dots {
+                position: absolute;
+                right: 32%;
+                top: 0px;
+            }
         }
-    }
+    
 }
 </style>

+ 2 - 1
src/view/popup/tabbar-page/index.vue

@@ -11,7 +11,8 @@
       <div class="tabbar-content">
         <router-view></router-view>
       </div>
-      <tabbar @tabbarClick = "onTabbarHandler"></tabbar>
+      <tabbar :userInfo="userInfo"  
+              @tabbarClick = "onTabbarHandler"></tabbar>
     </template>
   </div>
 </template>

+ 1 - 1
src/view/popup/withdraw/info.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 公共组件 -->
   <div class="info">
-    <v-head :title="'Withdraw'" :show_more="true"></v-head>
+    <v-head :title="'Withdraw'" :show_more="true" :show_help="true"></v-head>
     <!-- 内容 -->
     <div class="content">
       <div class="area-input-1">