|
@@ -2,6 +2,7 @@
|
|
|
<div class="Layout" ref="Layout" @scroll="scrollEvent">
|
|
|
<!-- 顶部top -->
|
|
|
<div class="top" :style="`background-color:${$route.meta.topColor}`">
|
|
|
+ <!-- <div class="MBL"></div> -->
|
|
|
<div class="left">
|
|
|
<img
|
|
|
src="@/assets/img/Layout/mean.png"
|
|
@@ -11,6 +12,7 @@
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<img
|
|
|
+ class="logoTop"
|
|
|
src="@/assets/img/Layout/logo.png"
|
|
|
alt=""
|
|
|
@click="$router.push('/Layout/Home').catch(() => {})"
|
|
@@ -28,6 +30,8 @@
|
|
|
<Router-view />
|
|
|
<!-- 点击菜单 -->
|
|
|
<div class="meanPage" v-show="meanPage">
|
|
|
+ <!-- 毛玻璃 -->
|
|
|
+ <div class="meanPageMBL"></div>
|
|
|
<div class="conten">
|
|
|
<div class="searchTop">
|
|
|
<div class="back">
|
|
@@ -57,7 +61,14 @@
|
|
|
v-for="(item, index) in menaData"
|
|
|
:key="index"
|
|
|
>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
+ <div class="oneMean">
|
|
|
+ {{ item.name }}
|
|
|
+ <van-icon
|
|
|
+ :name="menaSon === index ? 'arrow-down' : 'arrow'"
|
|
|
+ @click.stop="oneMeanChange(index,item.show)"
|
|
|
+ />
|
|
|
+ <!-- <van-icon name="arrow-down" /> -->
|
|
|
+ </div>
|
|
|
<template
|
|
|
v-if="
|
|
|
menaSon === index || item.show.includes($route.meta.myTitle)
|
|
@@ -268,13 +279,22 @@ export default {
|
|
|
},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ // 一级菜单箭头的展开和收起
|
|
|
+ oneMeanChange(index,show) {
|
|
|
+ if(show.includes(this.$route.meta.myTitle)) return
|
|
|
+ if (this.menaSon === index) this.menaSon = null;
|
|
|
+ else this.menaSon = index;
|
|
|
+ },
|
|
|
// 封装一个地址栏改变监听$route的方法
|
|
|
routeChange() {
|
|
|
let t = this.$route.params.t;
|
|
|
- if (t && t !== "null") this.txt = t;
|
|
|
-
|
|
|
// 对于二级菜单高亮的重定义
|
|
|
let temp = this.$route.path;
|
|
|
+ // 首页的重定义
|
|
|
+ if (temp === "/Layout/Home") this.menaSon = null;
|
|
|
+ if (temp.includes("Layout/Search")) {
|
|
|
+ if (t && t !== "null") this.txt = t;
|
|
|
+ } else this.txt = "";
|
|
|
let myId = this.$route.query.id;
|
|
|
myId = Number(myId);
|
|
|
if (temp === "/Layout/VisitInfo") temp = "/Layout/Visit/2";
|
|
@@ -288,29 +308,31 @@ export default {
|
|
|
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/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/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'
|
|
|
+ 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;
|
|
@@ -389,10 +411,13 @@ export default {
|
|
|
padding: 0 10px;
|
|
|
align-items: center;
|
|
|
width: 100%;
|
|
|
+ max-width: 500px;
|
|
|
+ transform: translateX(-50%);
|
|
|
top: 0;
|
|
|
- left: 0;
|
|
|
+ left: 50%;
|
|
|
position: fixed;
|
|
|
height: 50px;
|
|
|
+ z-index: 10;
|
|
|
.left {
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
@@ -404,6 +429,12 @@ export default {
|
|
|
.right {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
+ .logoTop {
|
|
|
+ position: absolute;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ }
|
|
|
& > img {
|
|
|
width: 20px;
|
|
|
height: 20px;
|
|
@@ -417,6 +448,17 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 毛玻璃
|
|
|
+ .MBL {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(210, 168, 127, 0.1);
|
|
|
+ backdrop-filter: blur(4px);
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
}
|
|
|
.erwei {
|
|
|
margin-top: 30px;
|
|
@@ -426,6 +468,8 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
& > img {
|
|
|
width: 40%;
|
|
|
+ max-width: 156px;
|
|
|
+ max-height: 156px;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -483,8 +527,10 @@ export default {
|
|
|
.searchBox {
|
|
|
padding: 10px;
|
|
|
position: fixed;
|
|
|
+ max-width: 500px;
|
|
|
top: 0;
|
|
|
- left: 0;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
z-index: 992;
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
@@ -526,15 +572,28 @@ export default {
|
|
|
// 菜单页面
|
|
|
.meanPage {
|
|
|
position: fixed;
|
|
|
+ max-width: 500px;
|
|
|
top: 0;
|
|
|
- left: 0;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
z-index: 991;
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
overflow-y: auto;
|
|
|
- background-color: rgba(255, 255, 255, 0.9);
|
|
|
+ // m毛玻璃
|
|
|
+ .meanPageMBL {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: rgba(0, 0, 0, 0.2);
|
|
|
+ backdrop-filter: blur(4px);
|
|
|
+ z-index: -1;
|
|
|
+ }
|
|
|
.conten {
|
|
|
- min-height: 100vh;
|
|
|
+ height: 100vh;
|
|
|
+ overflow-y: auto;
|
|
|
width: 90%;
|
|
|
background-color: #f6f4f1;
|
|
|
.searchTop {
|
|
@@ -565,6 +624,23 @@ export default {
|
|
|
color: #c1aa7b;
|
|
|
font-size: 20px;
|
|
|
padding-bottom: 20px;
|
|
|
+ .oneMean {
|
|
|
+ position: relative;
|
|
|
+ & > i {
|
|
|
+ width: 50px;
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ text-align: right;
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #c1aa7b;
|
|
|
+ z-index: 10;
|
|
|
+ position: absolute;
|
|
|
+ right: 0px;
|
|
|
+ top: 50%;
|
|
|
+ transform: translateY(-50%);
|
|
|
+ }
|
|
|
+ }
|
|
|
.rowSon {
|
|
|
padding-left: 30px;
|
|
|
font-size: 16px;
|