yujialong 2 years ago
parent e3d35d897f
commit 398e4a1319
  1. BIN
      src/assets/images/cn-white.png
  2. BIN
      src/assets/images/logo.png
  3. BIN
      src/assets/images/logo1.png
  4. BIN
      src/assets/images/search-white.png
  5. 28
      src/layouts/header/index.vue
  6. 7
      src/layouts/home/index.vue
  7. 13
      src/layouts/navbar/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

@ -1,30 +1,38 @@
<template> <template>
<div class="header"> <div :class="['header', { channel: isChannel }]">
<a class="logo" @click="toIndex"> <a class="logo" @click="toIndex">
<img src="@/assets/images/logo.png" alt=""> <img v-if="isChannel" src="@/assets/images/logo.png" alt="">
<template v-else>
<img src="@/assets/images/logo1.png" alt="">
深圳中能高重复自由电子激光 深圳中能高重复自由电子激光
</template>
</a> </a>
<navbar ref="nav"></navbar> <navbar ref="nav"></navbar>
<div class="tools"> <div class="tools">
<img class="search" src="@/assets/images/search.png" alt=""> <img class="search" :src="require('@/assets/images/search' + (isChannel ? '-white' : '') + '.png')" alt="">
<img src="@/assets/images/cn.png" alt=""> <img :src="require('@/assets/images/cn' + (isChannel ? '-white' : '') + '.png')" alt="">
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapState, mapMutations, mapActions } from "vuex"; import { mapState, mapMutations, mapActions } from 'vuex'
import Setting from "@/setting"; import Setting from '@/setting'
import util from "@/libs/util"; import util from '@/libs/util'
import navbar from "../navbar"; import navbar from '../navbar'
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.path === '/channel'
}; };
}, },
components: { components: {
navbar navbar
}, },
watch: {
'$route'() {
this.isChannel = this.$route.path === '/channel'
}
},
mounted() { mounted() {
}, },
@ -47,8 +55,10 @@ $height: 90px;
width: 100%; width: 100%;
min-width: $min-width; min-width: $min-width;
height: $height; height: $height;
&:not(.channel) {
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 9px 0px rgba(221,221,221,0.18); box-shadow: 0px 2px 9px 0px rgba(221,221,221,0.18);
}
.logo{ .logo{
position: absolute; position: absolute;
top: 0; top: 0;

@ -19,13 +19,18 @@ import vFooter from "../footer";
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.query.path === '/channel' isChannel: this.$route.path === '/channel'
}; };
}, },
components: { components: {
vHead, vHead,
vFooter vFooter
}, },
watch: {
'$route'() {
this.isChannel = this.$route.path === '/channel'
}
},
mounted() { mounted() {
}, },

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<ul class="nav"> <ul :class="['nav', { channel: isChannel }]">
<li v-for="(item, i) in menus" :key="i" :class="{active: active == item.id}" @click="jump(item)"> <li v-for="(item, i) in menus" :key="i" :class="{active: active == item.id}" @click="jump(item)">
{{ item.columnName }} {{ item.columnName }}
</li> </li>
@ -13,10 +13,16 @@ import Setting from '@/setting'
export default { export default {
data() { data() {
return { return {
isChannel: this.$route.path === '/channel',
active: this.$route.query.id, active: this.$route.query.id,
menus: [] menus: []
}; };
}, },
watch: {
'$route'() {
this.isChannel = this.$route.path === '/channel'
}
},
mounted() { mounted() {
this.getColumn() this.getColumn()
}, },
@ -64,6 +70,11 @@ export default {
color: $main-color; color: $main-color;
} }
} }
&.channel {
& > li {
color: #fff;
}
}
} }
@media (max-width: 1430px) { @media (max-width: 1430px) {
.nav { .nav {

Loading…
Cancel
Save