浏览代码

[edit][toolbox]

zhangwei 2 年之前
父节点
当前提交
527e0a2584
共有 2 个文件被更改,包括 8 次插入7 次删除
  1. 0 1
      src/entry/background.js
  2. 8 6
      src/view/iframe/tool-box/card.vue

+ 0 - 1
src/entry/background.js

@@ -17,7 +17,6 @@ import {
     getMessageInfo,
     injectExtensionPopup,
     setPopupConfig,
-    windwoLoadSetPopupPage,
     setActionPopup,
     getTwitterNftPostPre,
     nftTxtPublish,

+ 8 - 6
src/view/iframe/tool-box/card.vue

@@ -147,12 +147,12 @@ const getDetail = () => {
     iframe.onerror = () => {
         state.status = '网页错误'
     }
-    iframe.onload = () => {
-        if (state.status == '加载' || state.status == 'iframe') {
-            state.show_btn = true
-            state.status = 'iframe'
-        }
-    }
+    // iframe.onload = () => {
+    //     if (state.status == '加载' || state.status == 'iframe') {
+    //         state.show_btn = true
+    //         state.status = 'iframe'
+    //     }
+    // }
 
     getPostDetail({
         params: {
@@ -172,6 +172,8 @@ const getDetail = () => {
             if (state.detail.viewBgImagePath) {
                 state.cover_url = state.detail.viewBgImagePath
             }
+            state.show_btn = true
+            state.status = 'iframe'
             state.iframe_url = state.detail.convertUrl
         } else {
             state.status = '网页错误'