wangchenguang 2 years ago
commit a41da6de4d
  1. 8
      src/components/menuTree/index.vue
  2. 23
      src/layouts/header/index.vue
  3. 8
      src/layouts/home/index.vue
  4. 4
      src/layouts/navbar/index.vue
  5. 7
      src/libs/util.js
  6. 2
      src/pages/estate/event/index.vue
  7. 25
      src/pages/estate/index/index.vue

@ -1,7 +1,7 @@
<template>
<div class="menu-child">
<template v-for="item in this.menuList">
<el-submenu :popper-class="$route.path === '/home' || $route.path === '/sfel' ? 'home-menu-popup' : ''" :class="{active: $route.query.id == item.id}" :key="item.id" :index="String(item.id)" :id="item.id" v-if="item.children && item.children.length">
<el-submenu :popper-class="isHome ? 'home-menu-popup' : ''" :class="{active: $route.query.id == item.id}" :key="item.id" :index="String(item.id)" :id="item.id" v-if="item.children && item.children.length">
<template slot="title">
<span slot="title" :id="item.id">{{item.columnName}}</span>
</template>
@ -15,6 +15,7 @@
</template>
<script>
import Util from '@/libs/util'
export default {
name: 'menuTree',
props: {
@ -23,6 +24,11 @@ export default {
default: []
}
},
computed: {
isHome() {
return Util.isIndex()
},
},
data () {
return {}
},

@ -1,5 +1,5 @@
<template>
<div :class="['header', { channel: isHome }]">
<div :class="['header', { channel: isHome, estate: isEstate }]">
<a class="logo" @click="toIndex">
<template v-if="!$store.getters.getModelType">
<img :src="require('@/assets/images/logo2.png')" alt="">
@ -11,7 +11,7 @@
</a>
<!-- pc端 -->
<template v-if="$store.getters.getModelType">
<navbar ref="nav" :isHome.sync="isHome"></navbar>
<navbar ref="nav" :isHome.sync="isHome" :isEstate.sync="isEstate"></navbar>
<div class="tools">
<img class="search" :src="require('@/assets/images/search' + (isHome ? '-white' : '') + '.png')" alt="" @click.stop="toggleSearch">
<img :src="require('@/assets/images/cn' + (isHome ? '-white' : '') + '.png')" alt="" @click.stop="toggleLang">
@ -42,12 +42,14 @@
</div>
</template>
<script>
import Util from '@/libs/util'
import { mapMutations } from 'vuex'
import navbar from '../navbar'
export default {
data() {
return {
isHome: this.$route.path === '/home' || this.$route.path === '/sfel',
isHome: true,
isEstate: false,
showSearch: false,
title: '',
searchTimer: null,
@ -63,9 +65,14 @@ export default {
},
},
watch: {
'$route'() {
this.isHome = this.$route.path === '/home' || this.$route.path === '/sfel'
'$route.path': {
handler() {
this.isHome = Util.isIndex()
this.isEstate = this.$route.path === '/estate/index'
},
deep: true,
immediate: true
}
},
beforeDestroy () {
window.removeEventListener('scroll', this.handleScroll)
@ -86,10 +93,11 @@ export default {
},
// (home)
handleScroll () {
if (this.$route.path === '/home' || this.$route.path === '/sfel') {
if (Util.isIndex()) {
let scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
if (this.isHome == scrollTop > 907) {
this.isHome = !(scrollTop > 907)
this.isEstate = !(scrollTop > 907) && this.$route.path === '/estate/index'
}
}
},
@ -143,6 +151,9 @@ $height: 90px;
background-color: #fff;
border-bottom: 1px solid #f7f7f7;
}
&.estate {
background-color: rgba(0, 0, 0, .15);
}
.logo{
position: absolute;
top: 0;

@ -12,7 +12,7 @@
</template>
<script>
import util from '@/libs/util'
import Util from '@/libs/util'
import Setting from '@/setting'
import vHead from '../header'
import vFooter from '../footer'
@ -29,7 +29,7 @@ export default {
},
computed: {
isHome() {
return this.$route.path === '/home' || this.$route.path === '/sfel'
return Util.isIndex()
},
},
mounted() {
@ -54,8 +54,8 @@ export default {
};
setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
util.errorMsg("用户登录过期,请重新登录");
if (Util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
Util.errorMsg("用户登录过期,请重新登录");
setTimeout(this.logout, 1500);
}
}, 1000);

@ -1,6 +1,6 @@
<template>
<div>
<el-menu :class="['nav', {home: isHome}]" ref="elMenu" :key="menuRefresh" :mode="$store.getters.getModelType ? 'horizontal' : 'vertical' " :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump" :default-active="String(active)">
<el-menu :class="['nav', {home: isHome, estate: isEstate}]" ref="elMenu" :key="menuRefresh" :mode="$store.getters.getModelType ? 'horizontal' : 'vertical' " :background-color="bgColor" :text-color="textColor" :active-text-color="activeTextColor" @open="jump" @select="jump" :default-active="String(active)">
<menuTree :menuList="menus"/>
</el-menu>
</div>
@ -11,7 +11,7 @@ import menuTree from '@/components/menuTree'
import mixins from '@/mixins/article'
import { mapState, mapMutations } from 'vuex'
export default {
props: ['isHome','updateModelType'],
props: ['isHome', 'isEstate', 'updateModelType'],
mixins: [mixins],
data() {
return {

@ -1,5 +1,6 @@
import { _local } from "./util.db";
import { Message } from "element-ui";
import Router from '@/router'
// 文件后缀集合
const exts = {
@ -8,6 +9,8 @@ const exts = {
img: 'jpg,jpeg,png,gif,svg,psd',
doc: 'doc,docx,txt,xls,xlsx,csv,xml,ppt,pptx'
}
// 各个站点首页的路径
const indexPath = ['/home', '/sfel', '/estate/index']
const util = {
local: _local,
//返回格式化时间,传参例如:"yyyy-MM-dd hh:mm:ss"
@ -133,6 +136,10 @@ const util = {
}
}
return param[name] || null
},
// 是否是各个站点的首页,首页的导航样式不一样,所以要单独判断
isIndex() {
return indexPath.includes(Router.app.$route.path)
}
};

@ -189,7 +189,7 @@ export default {
}
}
.pic {
width: 350px;
width: 300px;
height: 195px;
}
}

@ -612,12 +612,7 @@ export default {
}
}
@media (max-width: 1520px) {
.conference .card-list {
width: 734px;
.texts {
width: 460px;
}
}
}
@media (max-width: 1200px) {
.sfel-banner{
@ -668,6 +663,17 @@ export default {
}
}
}
.talent {
.shows {
.left {
width: 100%;
margin-bottom: 20px;
}
.pic {
width: 100%;
}
}
}
.media-wrap{
flex-direction: column;
.left{
@ -701,6 +707,13 @@ export default {
flex: 1;
}
}
.program {
.list {
li {
background-size: cover;
}
}
}
#part6 {
.slide{
.texts{

Loading…
Cancel
Save