Commit 05480a58 authored by danfuman's avatar danfuman

修改

parent ab968a5d
......@@ -139,8 +139,8 @@ export const constantRoutes = [
{
path: '/performance/gzsc/:id',
component: () => import('@/views/market/detail'),
name: 'gzsc',
meta: { title: '公招市场详情', icon: 'enterprise', noCache: false },
name: 'GzscDetail',
meta: { title: '公招市场详情', icon: 'enterprise'},
}
]
},
......
......@@ -287,7 +287,7 @@ export default {
.headerFixed{
position: sticky;
top: 0;
z-index: 9;
z-index: 10;
padding-top: 16px;
margin-top: -16px;
background: #fff;
......
<template>
<div>
<div :style="{'minHeight':minHeight+'px'}">
<div :style="{'height':navigation.totalHeight+'px'}"></div>
<div class="iframe" v-loading="loading">
<iframe id="companyIframe" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="100%" :style="{height:iframeHight+'px'}" :src="src" />
</div>
</div>
<iframe id="companyIframe" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="100%" :src="src" />
</div>
</template>
......@@ -14,7 +9,7 @@
import { steerScroll } from '@/assets/js/jskplug';
import { dskAccessToken } from '@/api/common';
export default {
name: 'Detail',
name: 'GzscDetail',
data() {
return {
currentUrl:'',
......@@ -35,7 +30,6 @@
},
created() {
console.log("11111")
if(window.location.host === 'http://szh.jiansheku.com' || window.location.host === 'szh.jiansheku.com'){
this.domain='https://plug.jiansheku.com'
}else {
......@@ -48,11 +42,11 @@
}
},
mounted() {
this.setInitHeight() //设置初始相关高度
// this.setInitHeight() //设置初始相关高度
this.iframeLoading() // 判断iframe页面是否加载完成-当前页控制
steerScroll('companyIframe', this.navigation, this.footHeight, true, '', this) // 监听滚动(iframe的id、页面排除iframe后页面剩下高度[例:80]、增加监听[不传就是移除监听]、父级id[不带默认就是铺满整个页面]])
// steerScroll('companyIframe', this.navigation, this.footHeight, true, '', this) // 监听滚动(iframe的id、页面排除iframe后页面剩下高度[例:80]、增加监听[不传就是移除监听]、父级id[不带默认就是铺满整个页面]])
//控制页面内容最低高度
this.setMainHeight()
// this.setMainHeight()
},
beforeDestroy() {
clearInterval(this.iframeTimer) // -当前页控制
......@@ -69,17 +63,18 @@
const iframeHeight = document.getElementById('companyIframe').clientHeight
let number = 0
this.iframeTimer = setInterval(() => {
number = number + 1
number = number + 1000
if (document.getElementById('companyIframe').clientHeight !== iframeHeight || number === 5000) {
this.loading = false
clearInterval(this.iframeTimer)
}
})
},1000)
},
// 获取accessToken
async getAccesstoken(init){
dskAccessToken().then(res => {
if (res.code == 200) {
// this.loading = true
this.timelongs = res.data.expire;
this.ak = res.data.accessToken;
if(init){ //首次加载iframe地址
......@@ -133,10 +128,15 @@
}
</script>
<style lang="scss" scoped>
.iframe{
background: #fafafa;
.iframe {
width: 100%;
padding: 16px 24px;
padding-right: 15px;
box-sizing: border-box;
#companyIframe {
width: 100%;
height: 100%;
}
#companyIframe{
min-height: 500px;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment