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. 46
      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>
<div class="header">
<div :class="['header', { channel: isChannel }]">
<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>
<navbar ref="nav"></navbar>
<div class="tools">
<img class="search" src="@/assets/images/search.png" alt="">
<img src="@/assets/images/cn.png" alt="">
<img class="search" :src="require('@/assets/images/search' + (isChannel ? '-white' : '') + '.png')" alt="">
<img :src="require('@/assets/images/cn' + (isChannel ? '-white' : '') + '.png')" alt="">
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
import navbar from "../navbar";
import { mapState, mapMutations, mapActions } from 'vuex'
import Setting from '@/setting'
import util from '@/libs/util'
import navbar from '../navbar'
export default {
data() {
return {
isChannel: this.$route.path === '/channel'
};
},
components: {
navbar
},
watch: {
'$route'() {
this.isChannel = this.$route.path === '/channel'
}
},
mounted() {
},
@ -47,8 +55,10 @@ $height: 90px;
width: 100%;
min-width: $min-width;
height: $height;
background-color: #fff;
box-shadow: 0px 2px 9px 0px rgba(221,221,221,0.18);
&:not(.channel) {
background-color: #fff;
box-shadow: 0px 2px 9px 0px rgba(221,221,221,0.18);
}
.logo{
position: absolute;
top: 0;
@ -75,12 +85,12 @@ $height: 90px;
}
@media (max-width: 1430px) {
.header {
.logo {
left: 20px;
}
.inner {
padding-right: 20px;
}
.logo {
left: 20px;
}
.inner {
padding-right: 20px;
}
}
}
</style>

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

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

Loading…
Cancel
Save