Commit 05480a58 authored by danfuman's avatar danfuman

修改

parent ab968a5d
...@@ -139,8 +139,8 @@ export const constantRoutes = [ ...@@ -139,8 +139,8 @@ export const constantRoutes = [
{ {
path: '/performance/gzsc/:id', path: '/performance/gzsc/:id',
component: () => import('@/views/market/detail'), component: () => import('@/views/market/detail'),
name: 'gzsc', name: 'GzscDetail',
meta: { title: '公招市场详情', icon: 'enterprise', noCache: false }, meta: { title: '公招市场详情', icon: 'enterprise'},
} }
] ]
}, },
......
...@@ -287,7 +287,7 @@ export default { ...@@ -287,7 +287,7 @@ export default {
.headerFixed{ .headerFixed{
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 9; z-index: 10;
padding-top: 16px; padding-top: 16px;
margin-top: -16px; margin-top: -16px;
background: #fff; background: #fff;
......
<template> <template>
<div>
<div :style="{'minHeight':minHeight+'px'}">
<div :style="{'height':navigation.totalHeight+'px'}"></div>
<div class="iframe" v-loading="loading"> <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" /> <iframe id="companyIframe" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="100%" :src="src" />
</div>
</div>
</div> </div>
</template> </template>
...@@ -14,7 +9,7 @@ ...@@ -14,7 +9,7 @@
import { steerScroll } from '@/assets/js/jskplug'; import { steerScroll } from '@/assets/js/jskplug';
import { dskAccessToken } from '@/api/common'; import { dskAccessToken } from '@/api/common';
export default { export default {
name: 'Detail', name: 'GzscDetail',
data() { data() {
return { return {
currentUrl:'', currentUrl:'',
...@@ -35,7 +30,6 @@ ...@@ -35,7 +30,6 @@
}, },
created() { created() {
console.log("11111")
if(window.location.host === 'http://szh.jiansheku.com' || window.location.host === 'szh.jiansheku.com'){ if(window.location.host === 'http://szh.jiansheku.com' || window.location.host === 'szh.jiansheku.com'){
this.domain='https://plug.jiansheku.com' this.domain='https://plug.jiansheku.com'
}else { }else {
...@@ -48,11 +42,11 @@ ...@@ -48,11 +42,11 @@
} }
}, },
mounted() { mounted() {
this.setInitHeight() //设置初始相关高度 // this.setInitHeight() //设置初始相关高度
this.iframeLoading() // 判断iframe页面是否加载完成-当前页控制 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() { beforeDestroy() {
clearInterval(this.iframeTimer) // -当前页控制 clearInterval(this.iframeTimer) // -当前页控制
...@@ -69,17 +63,18 @@ ...@@ -69,17 +63,18 @@
const iframeHeight = document.getElementById('companyIframe').clientHeight const iframeHeight = document.getElementById('companyIframe').clientHeight
let number = 0 let number = 0
this.iframeTimer = setInterval(() => { this.iframeTimer = setInterval(() => {
number = number + 1 number = number + 1000
if (document.getElementById('companyIframe').clientHeight !== iframeHeight || number === 5000) { if (document.getElementById('companyIframe').clientHeight !== iframeHeight || number === 5000) {
this.loading = false this.loading = false
clearInterval(this.iframeTimer) clearInterval(this.iframeTimer)
} }
}) },1000)
}, },
// 获取accessToken // 获取accessToken
async getAccesstoken(init){ async getAccesstoken(init){
dskAccessToken().then(res => { dskAccessToken().then(res => {
if (res.code == 200) { if (res.code == 200) {
// this.loading = true
this.timelongs = res.data.expire; this.timelongs = res.data.expire;
this.ak = res.data.accessToken; this.ak = res.data.accessToken;
if(init){ //首次加载iframe地址 if(init){ //首次加载iframe地址
...@@ -133,10 +128,15 @@ ...@@ -133,10 +128,15 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.iframe{ .iframe {
background: #fafafa; width: 100%;
padding: 16px 24px;
padding-right: 15px;
box-sizing: border-box;
#companyIframe {
width: 100%;
height: 100%;
} }
#companyIframe{
min-height: 500px;
} }
</style> </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