浏览代码

no message

A\An 2 年之前
父节点
当前提交
08083242da

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

@@ -113,6 +113,8 @@ export function twitterPublishHandler(res) {
 }
 
 export function showPinTips() {
+    hidePopupPage();
+    hideNoticeBindTweet();
     getChromeStorage('pinData', (res) => {
         if (!res || res.show) {
             let domPop = document.getElementById('de-pin-pop');
@@ -122,8 +124,6 @@ export function showPinTips() {
 }
 
 export function hidePinTips() {
-    hidePopupPage();
-    hideNoticeBindTweet();
     let pop = document.querySelector('#de-pin-pop');
     if (pop) {
         pop.style.display = 'none';
@@ -376,6 +376,8 @@ function addPublishTipsIframe(params = {}) {
 }
 
 export function noticeBindTweet(params) {
+    hidePinTips();
+    hidePopupPage();
     let iframe = document.createElement('iframe');
     iframe.id = 'de-notice-bind-tweet';
     iframe.src = chrome.runtime.getURL('/iframe/bind-tweet.html') + `?params=${JSON.stringify(params)}`;
@@ -387,8 +389,6 @@ export function noticeBindTweet(params) {
 }
 
 export function hideNoticeBindTweet() {
-    hidePinTips();
-    hidePopupPage();
     let iframeContent = document.getElementById('de-notice-bind-tweet');
     if (iframeContent) {
         document.querySelector('body').removeChild(iframeContent)
@@ -1305,12 +1305,12 @@ export const appendPopupPage = (params) => {
 
 export const showPopupPage = (params) => {
     let { path = '' } = params;
+    hidePinTips();
+    hideNoticeBindTweet();
     appendPopupPage({ path });
 }
 
 export const hidePopupPage = () => {
-    hidePinTips();
-    hideNoticeBindTweet();
     let iframe = document.getElementById('de-popup-page');
     if (iframe) {
         document.querySelector('body').removeChild(iframe);

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

@@ -106,9 +106,9 @@ let NFTReqParams = {
 const emits = defineEmits(["tabbarClick"]);
 
 const tabbarHandler = (params, index) => {
+    setMessageCount();
     currentTab.value.index = index;
     currentTab.value.path = params.path;
-
     router.push(params.path);
     emits("tabbarClick", params);
 };
@@ -160,6 +160,7 @@ const setMessageCount = () => {
 
 onMounted(() => {
     setActiveTab();
+    setMessageCount();
 });
 </script>
 

+ 18 - 3
src/view/popup/currency-detail.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="currency-detail-page">
-    <v-head :title="currencyInfo.currencyName" 
+    <v-head :title="currencyInfo.tokenSymbol" 
             :show_more="false"
             :show_refresh="true"
             :show_list="true"
@@ -13,9 +13,12 @@
         class="icon-currency"
         :src="currencyInfo.iconPath"/>
       <div class="amount">
-        <a-tooltip :title="'$'+currencyInfo.totalBalance">
+        <div class="balance">
+          <a-tooltip :title="'$'+currencyInfo.totalBalance">
               ${{ getBit(currencyInfo.totalBalance) }}
-          </a-tooltip> {{currencyInfo.currencyName}}
+          </a-tooltip> 
+          {{currencyInfo.tokenSymbol}}
+        </div>
         <div class="final">
           <a-tooltip :title="'$'+currencyInfo.totalUsdEstimateBalance">
               ${{ getBit(currencyInfo.totalUsdEstimateBalance) }}
@@ -179,6 +182,7 @@ onMounted(() => {
         totalBalance,
         totalUsdEstimateBalance
       };
+      console.log(currencyInfo.value )
     }
 })
 </script>
@@ -206,6 +210,17 @@ onMounted(() => {
       font-weight: 700;
       font-size: 28px;
       text-align: center;
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      flex-direction: column;
+      width: 100%;
+      .balance {
+        padding: 0 18px;
+        box-sizing: border-box;
+        width: 100%;
+        word-break: break-word;
+      }
 
       .final {
         margin-top: 9px;

+ 16 - 0
src/view/popup/tabbar-page/message/index.vue

@@ -204,10 +204,12 @@ import { getMineLuckdropRecords } from "@/http/account";
 import { terminatedLuckdrop } from "@/http/redPacket";
 import { readAllMsgByType, getAllMessageInfo } from "@/http/messageApi"
 import { setBadgeInfo, hideBadge } from "@/logic/background/twitter";
+import { getChromeStorage } from "@/uilts/chromeExtension";
 
 var moment = require("moment");
 
 let currentTabIndex = ref(0);
+let userInfo = ref({});
 
 let tabList = ref([
   {
@@ -388,7 +390,21 @@ const setMessageCount = () => {
     });
 }
 
+
+const getUserInfo = (cb) => {
+  getChromeStorage("userInfo", (res) => {
+    if (res && res.accessToken) {
+      userInfo.value = res;
+    } else {
+      userInfo.value = {};
+    }
+    cb && cb(res);
+  });
+};
+
+
 onMounted(() => {
+  getUserInfo();
   getLuckdropRecordsList();
 
   setMessageCount();