Kaynağa Gözat

[edit] back

wenliming 2 yıl önce
ebeveyn
işleme
15d1af66eb

+ 1 - 13
src/entry/background.js

@@ -143,13 +143,7 @@ function onInstalledMethod() {
     })
 }
 
-const getCurrentTab = async () => {
-    let queryOptions = { active: true, lastFocusedWindow: true };
-    let [tab] = await chrome.tabs.query(queryOptions);
-    return tab || {};
-}
-
-async function onMessageMethod(req, sender, sendResponse) {
+function onMessageMethod(req, sender, sendResponse) {
     try {
 
         if (req) {
@@ -221,12 +215,6 @@ async function onMessageMethod(req, sender, sendResponse) {
                 case 'CONTENT_CLOSE_ACH_PAY_NOTICE':
                     closeAchPayNoticeHandler();
                     break;
-                case 'POPUP_SHOW_CONTENT_POPUP_PAGE':
-                    console.log('sender', sender)
-                    let tab = await getCurrentTab();
-                    
-                    chrome.tabs.sendMessage(tab.id, { actionType: 'BG_SHOW_CONTENT_POPUP_PAGE', data: ''}, (res) => { console.log(res) });
-                    break
             }
         }
     } catch (error) {

+ 0 - 4
src/entry/content.js

@@ -210,9 +210,5 @@ chrome.runtime.onMessage.addListener((req, sender, sendResponse) => {
         case 'Set_ToolBox_Fixed':
             toolBox.switchStatus(req)
             break
-        case 'BG_SHOW_CONTENT_POPUP_PAGE':
-            console.log('BG_SHOW_CONTENT_POPUP_PAGE')
-            showPopupPage();
-            break
     }
 })

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

@@ -295,16 +295,9 @@ const confirmDeposit = (params) => {
   let guideUrl = chrome.runtime.getURL('/iframe/ach-cashier.html');
   setChromeStorage({ achPayInfo : JSON.stringify(achPayInfo)});
 
-  chrome.runtime.sendMessage({ 
-      actionType: "POPUP_SHOW_CONTENT_POPUP_PAGE", 
-      data: { } 
-  }, () => { });
-
-  setTimeout(() => {
-    chrome.tabs.create({
-      url: guideUrl
-    });
-  }, 600)
+  chrome.tabs.create({
+    url: guideUrl
+  });
 }
 
 const onDepositAmountInput = async (params = {}) => {