|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="Publications">
|
|
|
- <div class="ban"></div>
|
|
|
+ <div class="ban" :class="banImg"></div>
|
|
|
<div class="nav_2">
|
|
|
<ul>
|
|
|
<li
|
|
@@ -33,41 +33,71 @@ export default {
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
+ banImg: "",
|
|
|
path: "",
|
|
|
topLi: [
|
|
|
{ name: "Magazines", path: "/Layout/Publications/1" },
|
|
|
{ name: "Exhibition Catalogues", path: "/Layout/Publications/2" },
|
|
|
+ { name: "Research", path: "/Layout/Publications/3" },
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
//监控data中的数据变化
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ $route(val) {
|
|
|
+ let id = val.query.id;
|
|
|
+ id = Number(id);
|
|
|
+ if (id >= 8) this.banImg = "ban2";
|
|
|
+ else this.banImg = "";
|
|
|
+ },
|
|
|
+ },
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
skip(url) {
|
|
|
- this.$router.push(url).catch(() => {});
|
|
|
+ if (
|
|
|
+ this.$route.path === "/Layout/PublicationsInfo" &&
|
|
|
+ url === "/Layout/Publications/1"
|
|
|
+ ) {
|
|
|
+ let temp;
|
|
|
+ let id = this.$route.query.id;
|
|
|
+ id = Number(id);
|
|
|
+ if (id >= 1 && id <= 5) temp = 2021;
|
|
|
+ else if (id <= 11) temp = 2020;
|
|
|
+ else if (id <= 17) temp = 2019;
|
|
|
+ else if (id <= 23) temp = 2018;
|
|
|
+ else temp = 2017;
|
|
|
+ this.$router.push({
|
|
|
+ name: "Publications1",
|
|
|
+ query: { k: temp },
|
|
|
+ });
|
|
|
+ } else this.$router.push(url).catch(() => {});
|
|
|
},
|
|
|
backUrl() {
|
|
|
if (this.$route.path === "/Layout/PublicationsInfo") {
|
|
|
- let temp
|
|
|
- let id =this.$route.query.id
|
|
|
- id = Number(id)
|
|
|
- if(id>=1&&id<=5) temp =2021
|
|
|
- else if(id<=11) temp =2020
|
|
|
- else if(id<=17) temp =2019
|
|
|
- else if(id<=23) temp =2018
|
|
|
- else temp =2017
|
|
|
+ let temp;
|
|
|
+ let id = this.$route.query.id;
|
|
|
+ id = Number(id);
|
|
|
+ if (id >= 1 && id <= 5) temp = 2021;
|
|
|
+ else if (id <= 11) temp = 2020;
|
|
|
+ else if (id <= 17) temp = 2019;
|
|
|
+ else if (id <= 23) temp = 2018;
|
|
|
+ else temp = 2017;
|
|
|
this.$router.push({
|
|
|
name: "Publications1",
|
|
|
- query: { k:temp },
|
|
|
+ query: { k: temp },
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
- created() {},
|
|
|
+ created() {
|
|
|
+ let id = this.$route.query.id;
|
|
|
+ id = Number(id);
|
|
|
+ if (id >= 8) this.banImg = "ban2";
|
|
|
+ else this.banImg = "";
|
|
|
+ },
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
@@ -88,6 +118,11 @@ export default {
|
|
|
#000000;
|
|
|
height: 218px;
|
|
|
}
|
|
|
+ .ban2 {
|
|
|
+ background: url("/data/Publications/banner2.jpg") no-repeat center top
|
|
|
+ #000000;
|
|
|
+ height: 300px;
|
|
|
+ }
|
|
|
.nav_2 {
|
|
|
width: 100%;
|
|
|
padding-bottom: 8px;
|
|
@@ -107,8 +142,8 @@ export default {
|
|
|
text-align: center;
|
|
|
& > img {
|
|
|
margin-top: 25px;
|
|
|
- // width: 49px;
|
|
|
- // height: 39px;
|
|
|
+ height: 40px;
|
|
|
+ object-fit: contain;
|
|
|
}
|
|
|
& > p {
|
|
|
margin-top: 5px;
|
|
@@ -131,7 +166,7 @@ export default {
|
|
|
.pos1 {
|
|
|
color: #c20e11;
|
|
|
}
|
|
|
- .jump{
|
|
|
+ .jump {
|
|
|
cursor: pointer;
|
|
|
}
|
|
|
}
|