|
@@ -12,9 +12,8 @@
|
|
</div>
|
|
</div>
|
|
<div class="content" v-else>
|
|
<div class="content" v-else>
|
|
<iframe :src="state.iframe_url" v-show="state.status == 'iframe'" ref="dom_iframe" frameborder="0"
|
|
<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 == '网页错误'">
|
|
<div class="state" v-show="state.status == '网页错误'">
|
|
<img :src="state.cover_url" alt="" class="cover" />
|
|
<img :src="state.cover_url" alt="" class="cover" />
|
|
@@ -78,7 +77,8 @@ let state = reactive({
|
|
postId: '',
|
|
postId: '',
|
|
tweetId: '',
|
|
tweetId: '',
|
|
detail: {},
|
|
detail: {},
|
|
- handle_type: ''
|
|
|
|
|
|
+ handle_type: '',
|
|
|
|
+ cover_url: require('@/assets/img/back-loading.png')
|
|
})
|
|
})
|
|
|
|
|
|
let dom = {}
|
|
let dom = {}
|
|
@@ -133,7 +133,8 @@ onMounted(() => {
|
|
if (res == state.tweetId) {
|
|
if (res == state.tweetId) {
|
|
state.status = '固定右上角'
|
|
state.status = '固定右上角'
|
|
} else {
|
|
} else {
|
|
- getDetail()
|
|
|
|
|
|
+ state.status = '加载'
|
|
|
|
+ // getDetail()
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -151,6 +152,7 @@ const getDetail = () => {
|
|
state.status = 'iframe'
|
|
state.status = 'iframe'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
getPostDetail({
|
|
getPostDetail({
|
|
params: {
|
|
params: {
|
|
postId: state.postId
|
|
postId: state.postId
|
|
@@ -160,16 +162,10 @@ const getDetail = () => {
|
|
state.detail = JSON.parse(res.data.postBizData)
|
|
state.detail = JSON.parse(res.data.postBizData)
|
|
console.log('postBizData', state.detail)
|
|
console.log('postBizData', state.detail)
|
|
// 加载iframe
|
|
// 加载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.iframe_url = state.detail.convertUrl
|
|
- // state.detail.urlInBlacklist
|
|
|
|
- // state.iframe_url = 'https://www.baidu.com'
|
|
|
|
- // setTimeout(() => {
|
|
|
|
-
|
|
|
|
- // state.status = ''
|
|
|
|
- // }, 1000)
|
|
|
|
} else {
|
|
} else {
|
|
state.status = '网页错误'
|
|
state.status = '网页错误'
|
|
}
|
|
}
|
|
@@ -395,7 +391,7 @@ const clickFull = () => {
|
|
iframe {
|
|
iframe {
|
|
background: #fff;
|
|
background: #fff;
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 504px;
|
|
|
|
|
|
+ height: 100%;
|
|
border: medium none;
|
|
border: medium none;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -410,6 +406,7 @@ const clickFull = () => {
|
|
|
|
|
|
.cover {
|
|
.cover {
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
+ height: 100%;
|
|
background: #000000;
|
|
background: #000000;
|
|
opacity: 0.6;
|
|
opacity: 0.6;
|
|
}
|
|
}
|