|
@@ -17,7 +17,7 @@
|
|
|
/>
|
|
|
<img src="@/assets/img/Layout/zhong.png" alt="" @click="toZhong" />
|
|
|
<img
|
|
|
- :class="{mySearch:$route.path==='/Layout/Search'}"
|
|
|
+ :class="{ mySearch: $route.path === '/Layout/Search' }"
|
|
|
src="@/assets/img/Layout/search.png"
|
|
|
alt=""
|
|
|
@click="searcShow = true"
|
|
@@ -40,7 +40,7 @@
|
|
|
/>
|
|
|
<img src="@/assets/img/Layout/zhong2.png" alt="" @click="toZhong" />
|
|
|
<img
|
|
|
- :class="{mySearch:$route.path==='/Layout/Search'}"
|
|
|
+ :class="{ mySearch: $route.path === '/Layout/Search' }"
|
|
|
src="@/assets/img/Layout/search2.png"
|
|
|
alt=""
|
|
|
@click="searcShow = true"
|
|
@@ -59,7 +59,9 @@
|
|
|
>
|
|
|
<span>{{ item.name }}</span>
|
|
|
<template
|
|
|
- v-if="menaSon === index || $route.meta.myTitle === item.name"
|
|
|
+ v-if="
|
|
|
+ menaSon === index || item.show.includes($route.meta.myTitle)
|
|
|
+ "
|
|
|
>
|
|
|
<div
|
|
|
class="rowSon"
|
|
@@ -83,7 +85,13 @@
|
|
|
<div class="searchBox" v-show="searcShow">
|
|
|
<div class="searcTop" @keyup.enter="searcBtn">
|
|
|
<div class="inco" @click="searcBtn"></div>
|
|
|
- <input type="text" v-model="txt" placeholder="search......" id="myInput"/>
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ v-model="txt"
|
|
|
+ placeholder="search......"
|
|
|
+ id="myInput"
|
|
|
+ ref="myInput"
|
|
|
+ />
|
|
|
<div class="Cancel" @click="searcShow = false">Cancel</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -113,7 +121,7 @@
|
|
|
<div class="link">
|
|
|
<span @click="$router.push('/Layout/Use')">Terms of Use</span>
|
|
|
<span @click="$router.push('/Layout/Events')">Events</span>
|
|
|
- <span @click="$router.push('/Layout/Employment')">Employmen</span>
|
|
|
+ <span @click="$router.push('/Layout/Employment')">Employment</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -137,8 +145,9 @@ export default {
|
|
|
meanPage: true,
|
|
|
menaData: [
|
|
|
{
|
|
|
+ show: "Visit,Reservation",
|
|
|
name: "Visit",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/Visit/1",
|
|
|
son: [
|
|
|
{ name: "Hours, Direction & Admission", path: "/Layout/Visit/1" },
|
|
|
{ name: "Reservation", path: "/Layout/Visit/2" },
|
|
@@ -150,8 +159,9 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "Exhibitions",
|
|
|
name: "Exhibitions",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/Exhibitions/Current",
|
|
|
son: [
|
|
|
{
|
|
|
name: "Current Exhibitions",
|
|
@@ -169,6 +179,7 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "Collections",
|
|
|
name: "Collections",
|
|
|
path: "/Layout/Collections",
|
|
|
son: [
|
|
@@ -195,8 +206,9 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "Learn & Engage",
|
|
|
name: "Learn & Engage",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/Learn/Students",
|
|
|
son: [
|
|
|
{ name: "For Students", path: "/Layout/Learn/Students" },
|
|
|
{ name: "For Adults", path: "/Layout/Learn/Adults" },
|
|
@@ -204,25 +216,31 @@ export default {
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "Publications",
|
|
|
name: "Publications",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/Publications/Magazines",
|
|
|
son: [
|
|
|
{ name: "Magazines", path: "/Layout/Publications/Magazines" },
|
|
|
- { name: "Exhibition Catalogues", path: "/Layout/Publications/Catalogues" },
|
|
|
+ {
|
|
|
+ name: "Exhibition Catalogues",
|
|
|
+ path: "/Layout/Publications/Catalogues",
|
|
|
+ },
|
|
|
// { name: "Research", path: "" },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "Join & Support",
|
|
|
name: "Join & Support",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/Join/Volunteer",
|
|
|
son: [
|
|
|
{ name: "Ways to Volunteer", path: "/Layout/Join/Volunteer" },
|
|
|
{ name: "Ways to Give", path: "/Layout/Join/Give" },
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
+ show: "About",
|
|
|
name: "About",
|
|
|
- path: "",
|
|
|
+ path: "/Layout/About/1",
|
|
|
son: [
|
|
|
{ name: "From the Director", path: "/Layout/About/1" },
|
|
|
{ name: "History", path: "/Layout/About/2" },
|
|
@@ -235,38 +253,88 @@ export default {
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
- //监控data中的数据变化
|
|
|
+ //监控data中的数据变
|
|
|
watch: {
|
|
|
$route() {
|
|
|
this.routeChange();
|
|
|
},
|
|
|
- // searcShow() {
|
|
|
- // this.txt = "";
|
|
|
- // },
|
|
|
+ searcShow(val) {
|
|
|
+ if (val) {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$refs.myInput.focus();
|
|
|
+ }, 100);
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
// 封装一个地址栏改变监听$route的方法
|
|
|
routeChange() {
|
|
|
- let t = this.$route.params.t
|
|
|
- if(t&&t!=='null') this.txt =t
|
|
|
- this.menaInd = this.$route.path;
|
|
|
+ let t = this.$route.params.t;
|
|
|
+ if (t && t !== "null") this.txt = t;
|
|
|
+
|
|
|
+ // 对于二级菜单高亮的重定义
|
|
|
+ let temp = this.$route.path;
|
|
|
+ let myId = this.$route.query.id;
|
|
|
+ myId = Number(myId);
|
|
|
+ if (temp === "/Layout/VisitInfo") temp = "/Layout/Visit/2";
|
|
|
+ if (
|
|
|
+ temp === "/Layout/Detail" ||
|
|
|
+ temp === "/Layout/Objects" ||
|
|
|
+ temp === "/Layout/Galleries"
|
|
|
+ ) {
|
|
|
+ if (myId <= 1) temp = "/Layout/Exhibitions/Current";
|
|
|
+ else if (myId <= 10) temp = "/Layout/Exhibitions/Permanent";
|
|
|
+ else if (myId <= 47) temp = "/Layout/Exhibitions/Past";
|
|
|
+ else temp = "/Layout/Exhibitions/Overseas";
|
|
|
+ }
|
|
|
+ if(temp ==='/Layout/CollectionsDetail') {
|
|
|
+ let k =this.$route.query.k
|
|
|
+ if(k==='Bronzes') temp ='/Layout/Collections/Bronzes'
|
|
|
+ else if(k==='Ceramics') temp ='/Layout/Collections/Ceramics'
|
|
|
+ else if(k==='Buddhist') temp ='/Layout/Collections/Buddhist'
|
|
|
+ else if(k==='Jadewares') temp ='/Layout/Collections/Jadewares'
|
|
|
+ else if(k==='Calligraphies') temp ='/Layout/Collections/Calligraphies'
|
|
|
+ else if(k==='Paintings') temp ='/Layout/Collections/Paintings'
|
|
|
+ else if(k==='Gold') temp ='/Layout/Collections/Gold'
|
|
|
+ else if(k==='Coins') temp ='/Layout/Collections/Coins'
|
|
|
+ else if(k==='Brocades') temp ='/Layout/Collections/Brocades'
|
|
|
+ else if(k==='Cultural') temp ='/Layout/Collections/Cultural'
|
|
|
+ else temp ='/Layout/Collections/Miscellaneous'
|
|
|
+ }
|
|
|
+ if(temp ==='/Layout/Learn/Info') {
|
|
|
+ if(myId<=39) temp ='/Layout/Learn/Students'
|
|
|
+ else if(myId<=72) temp ='/Layout/Learn/Adults'
|
|
|
+ else temp ='/Layout/Learn/Families'
|
|
|
+ }
|
|
|
+ if(temp ==='/Layout/Publications/Info') temp ='/Layout/Publications/Magazines'
|
|
|
+ if(temp ==='/Layout/Join/Info') temp ='/Layout/Join/Volunteer'
|
|
|
+ if(temp ==='/Layout/AboutDirector') temp ='/Layout/About/1'
|
|
|
+ if(temp ==='/Layout/AboutLink') temp ='/Layout/About/3'
|
|
|
+ this.menaInd = temp;
|
|
|
+
|
|
|
this.meanPage = false;
|
|
|
},
|
|
|
searcBtn() {
|
|
|
- this.$router.push(`/Layout/Search/${this.txt?this.txt:'null'}`);
|
|
|
- this.searcShow=false
|
|
|
+ this.$router.push(`/Layout/Search/${this.txt ? this.txt : "null"}`);
|
|
|
+ this.searcShow = false;
|
|
|
},
|
|
|
menaSonFu(index, path) {
|
|
|
if (path) {
|
|
|
- this.$router.push("/Layout/Collections").catch(() => {});
|
|
|
+ this.$router.push(path).catch(() => {});
|
|
|
this.menaSon = index;
|
|
|
+ if (this.$route.path === path) {
|
|
|
+ this.meanPage = false;
|
|
|
+ }
|
|
|
return;
|
|
|
}
|
|
|
if (this.menaSon === index) this.menaSon = null;
|
|
|
else this.menaSon = index;
|
|
|
},
|
|
|
skip(path) {
|
|
|
+ if (this.$route.path === path) {
|
|
|
+ this.meanPage = false;
|
|
|
+ }
|
|
|
this.$router.push(path).catch(() => {});
|
|
|
},
|
|
|
toTop() {
|
|
@@ -390,6 +458,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .logo {
|
|
|
+ width: 270px;
|
|
|
+ & > img {
|
|
|
+ width: 270px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.toTop {
|
|
|
position: fixed;
|
|
@@ -402,7 +476,7 @@ export default {
|
|
|
color: #fff;
|
|
|
font-size: 30px;
|
|
|
right: 10px;
|
|
|
- bottom: 200px;
|
|
|
+ bottom: 100px;
|
|
|
z-index: 99;
|
|
|
}
|
|
|
// 搜索页面
|
|
@@ -460,6 +534,7 @@ export default {
|
|
|
overflow-y: auto;
|
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
|
.conten {
|
|
|
+ min-height: 100vh;
|
|
|
width: 90%;
|
|
|
background-color: #f6f4f1;
|
|
|
.searchTop {
|