zhangwei 2 anni fa
parent
commit
bb4b50b5e3

BIN
src/assets/img/back-loading.png


+ 3 - 3
src/logic/content/ParseCard.js

@@ -245,7 +245,7 @@ class ParseCard {
         }
         _iframe.src = _iframe_url
         _iframe.scrolling = 'no'
-        _iframe.style.cssText = 'border:medium none; width:505px; height:544px; max-height:544px;     filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 4px 20px);'
+        _iframe.style.cssText = 'border:medium none; width:505px; height:545px; max-height:545px;     filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 4px 20px);'
         return _iframe
     }
     createIframe({ post_Id = '', tweet_Id = '', tweet_author = '', page_type = '' }, if_center = false) {
@@ -355,7 +355,7 @@ class ParseCard {
         div.id = 'denet-' + tweet_Id
         div.style.cssText = `
         width: 505px;
-        height: 544px;`
+        height: 545px;`
         div.dataset.tweetId = tweet_Id || ''
         div.dataset.postId = post_Id || ''
         parentElement.appendChild(div)
@@ -418,7 +418,7 @@ class ParseCard {
             dom = dom_card.querySelector('div[lang][dir=auto]').parentElement
         }
 
-        dom.style = 'min-height:544px'
+        dom.style = 'min-height:545px'
         if (dom) {
             // debugger mode
             if (window.location.href.includes('denet_debugger')) {

+ 2 - 2
src/logic/content/ToolBox.js

@@ -11,7 +11,7 @@ export const toolBox = new class ToolBox {
         iframe.id = 'denet-tool-box-fixed'
         iframe.style.cssText = `
             width: 505px;
-            height: 544px;
+            height: 545px;
             position: fixed;
             right: 10px;
             top: 10px;
@@ -42,7 +42,7 @@ export const toolBox = new class ToolBox {
                 dom_fixed.style.cssText = `
                     display:block;
                     width: 505px;
-                    height: 544px;
+                    height: 545px;
                     position: fixed;
                     right: 10px;
                     top: 10px;

+ 1 - 1
src/view/content/tool-box/full.vue

@@ -77,7 +77,7 @@ const changeFull = () => {
 const changeFixed = () => {
     dom_fixed.style.cssText = `
     width: 505px;
-    height: 544px;
+    height: 545px;
     position: fixed;
     right: 10px;
     top: 10px;`

+ 1 - 1
src/view/content/tool-box/index.vue

@@ -226,7 +226,7 @@ const handleFixed = () => {
     dom.fixed.style.cssText = `
         display:block;
         width: 505px;
-        height: 544px;
+        height: 545px;
         position: fixed;
         right: 10px;
         top: 10px;`

+ 12 - 15
src/view/iframe/tool-box/card.vue

@@ -12,9 +12,8 @@
         </div>
         <div class="content" v-else>
             <iframe :src="state.iframe_url" v-show="state.status == 'iframe'" ref="dom_iframe" frameborder="0"
-                scrolling="yes"
-                sandbox="allow-same-origin allow-scripts allow-popups allow-top-navigation allow-forms allow-modals allow-popups-to-escape-sandbox"
-                allow="camera *;microphone *"></iframe>
+                scrolling="yes" allow="camera *;microphone *"></iframe>
+            <!-- sandbox="allow-same-origin allow-scripts allow-popups allow-top-navigation allow-forms allow-modals allow-popups-to-escape-sandbox" -->
             <!-- 网页错误 -->
             <div class="state" v-show="state.status == '网页错误'">
                 <img :src="state.cover_url" alt="" class="cover" />
@@ -78,7 +77,8 @@ let state = reactive({
     postId: '',
     tweetId: '',
     detail: {},
-    handle_type: ''
+    handle_type: '',
+    cover_url: require('@/assets/img/back-loading.png')
 })
 
 let dom = {}
@@ -133,7 +133,8 @@ onMounted(() => {
         if (res == state.tweetId) {
             state.status = '固定右上角'
         } else {
-            getDetail()
+            state.status = '加载'
+            // getDetail()
         }
     })
 
@@ -151,6 +152,7 @@ const getDetail = () => {
             state.status = 'iframe'
         }
     }
+
     getPostDetail({
         params: {
             postId: state.postId
@@ -160,16 +162,10 @@ const getDetail = () => {
             state.detail = JSON.parse(res.data.postBizData)
             console.log('postBizData', state.detail)
             // 加载iframe
-            state.cover_url = state.detail.linkImagePath
-            // state.cover_url = 'https://www.keaidian.com/uploads/allimg/190424/24110307_8.jpg'
-            state.status = '加载'
+            if (state.detail.viewBgImagePath) {
+                state.cover_url = state.detail.viewBgImagePath
+            }
             state.iframe_url = state.detail.convertUrl
-            // state.detail.urlInBlacklist
-            // state.iframe_url = 'https://www.baidu.com'
-            // setTimeout(() => {
-
-            // state.status = ''
-            // }, 1000)
         } else {
             state.status = '网页错误'
         }
@@ -395,7 +391,7 @@ const clickFull = () => {
         iframe {
             background: #fff;
             width: 100%;
-            height: 504px;
+            height: 100%;
             border: medium none;
         }
 
@@ -410,6 +406,7 @@ const clickFull = () => {
 
             .cover {
                 width: 100%;
+                height: 100%;
                 background: #000000;
                 opacity: 0.6;
             }