|
@@ -3,27 +3,80 @@
|
|
<!-- 顶部top -->
|
|
<!-- 顶部top -->
|
|
<div class="top" :style="`background-color:${$route.meta.topColor}`">
|
|
<div class="top" :style="`background-color:${$route.meta.topColor}`">
|
|
<div class="left">
|
|
<div class="left">
|
|
- <img src="@/assets/img/Layout/mean.png" alt="" @click="searchPage=true"/>
|
|
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/mean.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="meanPage = true"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
<div class="right">
|
|
<div class="right">
|
|
- <img src="@/assets/img/Layout/logo.png" alt="" />
|
|
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/logo.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="$router.push('/').catch(() => {})"
|
|
|
|
+ />
|
|
<img src="@/assets/img/Layout/zhong.png" alt="" @click="toZhong" />
|
|
<img src="@/assets/img/Layout/zhong.png" alt="" @click="toZhong" />
|
|
- <img src="@/assets/img/Layout/search.png" alt="" />
|
|
|
|
|
|
+ <img src="@/assets/img/Layout/search.png" alt="" @click="searcShow=true"/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 子页面 -->
|
|
<!-- 子页面 -->
|
|
<Router-view />
|
|
<Router-view />
|
|
- <!-- 点击搜索 -->
|
|
|
|
- <div class="searchPage" v-show="searchPage">
|
|
|
|
|
|
+ <!-- 点击菜单 -->
|
|
|
|
+ <div class="meanPage" v-show="meanPage">
|
|
<div class="conten">
|
|
<div class="conten">
|
|
<div class="searchTop">
|
|
<div class="searchTop">
|
|
- <div class="back"><van-icon name="arrow-left" @click="searchPage=false"/></div>
|
|
|
|
- <img src="@/assets/img/Layout/logo2.png" alt="" />
|
|
|
|
|
|
+ <div class="back">
|
|
|
|
+ <van-icon name="arrow-left" @click="meanPage = false" />
|
|
|
|
+ </div>
|
|
|
|
+ <img
|
|
|
|
+ src="@/assets/img/Layout/logo2.png"
|
|
|
|
+ alt=""
|
|
|
|
+ @click="$router.push('/').catch(() => {})"
|
|
|
|
+ />
|
|
<img src="@/assets/img/Layout/zhong2.png" alt="" @click="toZhong" />
|
|
<img src="@/assets/img/Layout/zhong2.png" alt="" @click="toZhong" />
|
|
- <img src="@/assets/img/Layout/search2.png" alt="" />
|
|
|
|
|
|
+ <img src="@/assets/img/Layout/search2.png" alt="" @click="searcShow=true"/>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="rowAll">
|
|
|
|
+ <div
|
|
|
|
+ :class="{
|
|
|
|
+ active: index === 4 || index === 6,
|
|
|
|
+ accOne: $route.meta.myTitle === item.acc,
|
|
|
|
+ }"
|
|
|
|
+ @click="menaSonFu(index)"
|
|
|
|
+ class="row"
|
|
|
|
+ v-for="(item, index) in menaData"
|
|
|
|
+ :key="index"
|
|
|
|
+ >
|
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
|
+ <template
|
|
|
|
+ v-if="menaSon === index || $route.meta.myTitle === item.acc"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ class="rowSon"
|
|
|
|
+ v-for="(val, valInd) in item.son"
|
|
|
|
+ :key="valInd"
|
|
|
|
+ :class="{ acc: menaInd === val.path }"
|
|
|
|
+ @click="skip(val.path)"
|
|
|
|
+ >
|
|
|
|
+ {{ val.name }}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="erwei">
|
|
|
|
+ <img src="@/assets/img/Layout/erwei1.png" alt="" />
|
|
|
|
+ <img src="@/assets/img/Layout/erwei2.png" alt="" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 点击搜索 -->
|
|
|
|
+ <div class="searchBox" v-if="searcShow">
|
|
|
|
+ <div class="searcTop" @keyup.enter="searcBtn">
|
|
|
|
+ <div class="inco" @click="searcBtn"></div>
|
|
|
|
+ <input type="text" v-model="txt" placeholder="search......" />
|
|
|
|
+ <div class="Cancel" @click="searcShow=false">Cancel</div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<!-- 回到顶部 -->
|
|
<!-- 回到顶部 -->
|
|
<div class="toTop" v-show="srocllShow" @click="toTop">
|
|
<div class="toTop" v-show="srocllShow" @click="toTop">
|
|
<van-icon name="back-top" />
|
|
<van-icon name="back-top" />
|
|
@@ -59,16 +112,120 @@ export default {
|
|
data() {
|
|
data() {
|
|
//这里存放数据
|
|
//这里存放数据
|
|
return {
|
|
return {
|
|
|
|
+ // 搜索的变量
|
|
|
|
+ searcShow: false,
|
|
|
|
+ txt: "",
|
|
|
|
+ // 控制二级菜单的高亮
|
|
|
|
+ menaInd: null,
|
|
|
|
+ // 控制二级菜单的显示
|
|
|
|
+ menaSon: null,
|
|
srocllShow: false,
|
|
srocllShow: false,
|
|
- searchPage: false,
|
|
|
|
|
|
+ meanPage: true,
|
|
|
|
+ menaData: [
|
|
|
|
+ {
|
|
|
|
+ acc: "Visit",
|
|
|
|
+ name: "Visit",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "Hours, Direction & Admission", path: "/Layout/Visit/1" },
|
|
|
|
+ { name: "Reservation", path: "/Layout/Visit/2" },
|
|
|
|
+ { name: "Floor Plans", path: "/Layout/Visit/3" },
|
|
|
|
+ { name: "Audio Guide & Tour", path: "/Layout/Visit/4" },
|
|
|
|
+ { name: "Accessibility", path: "/Layout/Visit/5" },
|
|
|
|
+ { name: "Café & Shop", path: "/Layout/Visit/6" },
|
|
|
|
+ { name: "Visitor Guidelines", path: "/Layout/Visit/7" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Exhibitions",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "Current Exhibitions", path: "" },
|
|
|
|
+ { name: "Permanent Exhibitions", path: "" },
|
|
|
|
+ { name: "Past Exhibitions", path: "" },
|
|
|
|
+ { name: "Overseas Exhibitions", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Collections",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "Bronzes", path: "" },
|
|
|
|
+ { name: "Ceramics", path: "" },
|
|
|
|
+ { name: "Buddhist Statues", path: "" },
|
|
|
|
+ { name: "Jadewares", path: "" },
|
|
|
|
+ { name: "Calligraphies", path: "" },
|
|
|
|
+ { name: "Paintings", path: "" },
|
|
|
|
+ { name: "Gold & Silverwares", path: "" },
|
|
|
|
+ { name: "Coins & Banknotes", path: "" },
|
|
|
|
+ { name: "Brocades & Embroideries", path: "" },
|
|
|
|
+ { name: "Cultural Supplies", path: "" },
|
|
|
|
+ { name: "Miscellaneous", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Learn & Engage",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "For Students", path: "" },
|
|
|
|
+ { name: "For Adults", path: "" },
|
|
|
|
+ { name: "For Families & Children", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Publications",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "Magazines", path: "" },
|
|
|
|
+ { name: "Exhibition Catalogues", path: "" },
|
|
|
|
+ { name: "Research", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "Join & Support",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "Ways to Volunteer", path: "" },
|
|
|
|
+ { name: "Ways to Give", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "About",
|
|
|
|
+ path: "",
|
|
|
|
+ son: [
|
|
|
|
+ { name: "From the Director", path: "" },
|
|
|
|
+ { name: "History", path: "" },
|
|
|
|
+ { name: "Partners & Connections", path: "" },
|
|
|
|
+ { name: "Contact", path: "" },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
//监听属性 类似于data概念
|
|
//监听属性 类似于data概念
|
|
computed: {},
|
|
computed: {},
|
|
//监控data中的数据变化
|
|
//监控data中的数据变化
|
|
- watch: {},
|
|
|
|
|
|
+ watch: {
|
|
|
|
+ $route() {
|
|
|
|
+ this.menaInd = this.$route.path;
|
|
|
|
+ this.meanPage = false;
|
|
|
|
+ },
|
|
|
|
+ searcShow(){
|
|
|
|
+ this.txt=''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//方法集合
|
|
//方法集合
|
|
methods: {
|
|
methods: {
|
|
|
|
+ searcBtn(){
|
|
|
|
+ console.log('搜索~');
|
|
|
|
+ },
|
|
|
|
+ menaSonFu(index) {
|
|
|
|
+ if (this.menaSon === index) this.menaSon = null;
|
|
|
|
+ else this.menaSon = index;
|
|
|
|
+ },
|
|
|
|
+ skip(path) {
|
|
|
|
+ this.$router.push(path).catch(() => {});
|
|
|
|
+ },
|
|
toTop() {
|
|
toTop() {
|
|
let dom = this.$refs.Layout;
|
|
let dom = this.$refs.Layout;
|
|
dom.scrollTo({ top: 0, behavior: "smooth" });
|
|
dom.scrollTo({ top: 0, behavior: "smooth" });
|
|
@@ -84,7 +241,10 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
- created() {},
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.menaInd = this.$route.path;
|
|
|
|
+ this.meanPage = false;
|
|
|
|
+ },
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
mounted() {},
|
|
mounted() {},
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
@@ -109,6 +269,7 @@ export default {
|
|
height: 100vh;
|
|
height: 100vh;
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
.top {
|
|
.top {
|
|
|
|
+ z-index: 990;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|
|
@@ -143,21 +304,22 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .erwei {
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ display: flex;
|
|
|
|
+ padding: 0 10px;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ & > img {
|
|
|
|
+ width: 40%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
.bottom {
|
|
.bottom {
|
|
padding: 20px;
|
|
padding: 20px;
|
|
padding-bottom: 0;
|
|
padding-bottom: 0;
|
|
width: 100%;
|
|
width: 100%;
|
|
background-color: #c1aa7b;
|
|
background-color: #c1aa7b;
|
|
- .erwei {
|
|
|
|
- margin-top: 30px;
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
- display: flex;
|
|
|
|
- padding: 0 10px;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- & > img {
|
|
|
|
- width: 40%;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
.txt {
|
|
.txt {
|
|
padding: 0 10px 20px;
|
|
padding: 0 10px 20px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -197,17 +359,61 @@ export default {
|
|
bottom: 200px;
|
|
bottom: 200px;
|
|
}
|
|
}
|
|
// 搜索页面
|
|
// 搜索页面
|
|
- .searchPage {
|
|
|
|
|
|
+ .searchBox {
|
|
|
|
+ padding: 10px;
|
|
position: fixed;
|
|
position: fixed;
|
|
top: 0;
|
|
top: 0;
|
|
left: 0;
|
|
left: 0;
|
|
- z-index: 999;
|
|
|
|
|
|
+ z-index: 992;
|
|
width: 100vw;
|
|
width: 100vw;
|
|
height: 100vh;
|
|
height: 100vh;
|
|
|
|
+ background-color: #f9f8f5;
|
|
|
|
+ .searcTop {
|
|
|
|
+ position: relative;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ height: 40px;
|
|
|
|
+ .inco {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 10;
|
|
|
|
+ content: "";
|
|
|
|
+ display: block;
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 9px;
|
|
|
|
+ left: 10px;
|
|
|
|
+ background: url("../../assets/img/Layout/search2.png");
|
|
|
|
+ background-size: 20px, 20px;
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px;
|
|
|
|
+ }
|
|
|
|
+ & > input {
|
|
|
|
+ width: 80%;
|
|
|
|
+ height: 38px;
|
|
|
|
+ border-radius: 19px;
|
|
|
|
+ padding-left: 40px;
|
|
|
|
+ border: 1px solid #d2b986;
|
|
|
|
+ background-color: transparent;
|
|
|
|
+ }
|
|
|
|
+ .Cancel {
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ min-width: 50px;
|
|
|
|
+ width: 15%;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 菜单页面
|
|
|
|
+ .meanPage {
|
|
|
|
+ position: fixed;
|
|
|
|
+ top: 0;
|
|
|
|
+ left: 0;
|
|
|
|
+ z-index: 991;
|
|
|
|
+ width: 100vw;
|
|
|
|
+ height: 100vh;
|
|
|
|
+ overflow-y: auto;
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
background-color: rgba(255, 255, 255, 0.9);
|
|
.conten {
|
|
.conten {
|
|
width: 90%;
|
|
width: 90%;
|
|
- height: 100%;
|
|
|
|
background-color: #f6f4f1;
|
|
background-color: #f6f4f1;
|
|
.searchTop {
|
|
.searchTop {
|
|
width: 100%;
|
|
width: 100%;
|
|
@@ -215,7 +421,7 @@ export default {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
height: 50px;
|
|
height: 50px;
|
|
- .back{
|
|
|
|
|
|
+ .back {
|
|
margin-right: 15px;
|
|
margin-right: 15px;
|
|
font-size: 28px;
|
|
font-size: 28px;
|
|
}
|
|
}
|
|
@@ -229,6 +435,42 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .rowAll {
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ padding: 0 30px;
|
|
|
|
+ .row {
|
|
|
|
+ font-weight: 700;
|
|
|
|
+ color: #c1aa7b;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
+ .rowSon {
|
|
|
|
+ padding-left: 30px;
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ margin-top: 20px;
|
|
|
|
+ color: #c1aa7b;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ }
|
|
|
|
+ .acc {
|
|
|
|
+ color: #bc1c24;
|
|
|
|
+ background: url("../../assets/img/Layout/chosen.png") no-repeat left
|
|
|
|
+ top;
|
|
|
|
+ background-size: 22px 18px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .active {
|
|
|
|
+ border-bottom: 1px solid #c1aa7b;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ }
|
|
|
|
+ .accOne {
|
|
|
|
+ color: #bc1c24;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .erwei {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
+ padding-left: 30px;
|
|
|
|
+ padding-right: 30px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|