|
@@ -1,17 +1,57 @@
|
|
|
<!-- 场馆漫游 -->
|
|
|
<template>
|
|
|
- <div class="layout">
|
|
|
- <div class="title">{{detail.name}}</div>
|
|
|
- <div class="container">
|
|
|
- <img class="pic" :src="detail.detailImg" alt="" />
|
|
|
- <div class="content">
|
|
|
- <div class="txt">
|
|
|
- {{detail.content}}
|
|
|
+ <div class="root">
|
|
|
+ <div class="layout" v-if="!isMobile">
|
|
|
+ <div class="title">{{ detail.name }}</div>
|
|
|
+ <div class="container">
|
|
|
+ <img class="pic" :src="detail.detailImg" alt="" />
|
|
|
+ <div class="content">
|
|
|
+ <div class="txt">
|
|
|
+ {{ detail.content }}
|
|
|
+ </div>
|
|
|
+ <div class="btns">
|
|
|
+ <div class="btn" @click="handleClickEvent('travelAround', detail)">
|
|
|
+ VR云游
|
|
|
+ </div>
|
|
|
+ <div class="btn" @click="handleClickEvent('overLook', detail)">
|
|
|
+ VR俯瞰
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="btn"
|
|
|
+ @click="handleClickEvent('intensiveReading', detail)"
|
|
|
+ >
|
|
|
+ 党史精读
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- <div class="btns">
|
|
|
- <div class="btn" @click="handleClickEvent('travelAround',detail)">VR云游</div>
|
|
|
- <div class="btn" @click="handleClickEvent('overLook',detail)">VR俯瞰</div>
|
|
|
- <div class="btn" @click="handleClickEvent('intensiveReading',detail)">党史精读</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-if="isMobile" class="mobile-layout">
|
|
|
+ <div class="mobile-card">
|
|
|
+ <div class="mobile-content">
|
|
|
+ <div class="pic">
|
|
|
+ <img :src="detail.detailImg" alt="" />
|
|
|
+ </div>
|
|
|
+ <div class="txt">
|
|
|
+ <div class="title">{{ detail.name }}</div>
|
|
|
+ <div class="con">
|
|
|
+ {{ detail.content }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="btns">
|
|
|
+ <div class="btn left-btn" @click="handleClickEvent('travelAround', detail)">
|
|
|
+ VR云游
|
|
|
+ </div>
|
|
|
+ <div class="btn center-btn" @click="handleClickEvent('overLook', detail)">
|
|
|
+ VR俯瞰
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="btn right-btn"
|
|
|
+ @click="handleClickEvent('intensiveReading', detail)"
|
|
|
+ >
|
|
|
+ 党史精读
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -19,13 +59,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import browser from "@/utils/browser.js";
|
|
|
export default {
|
|
|
- components: {
|
|
|
- },
|
|
|
+ components: {},
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
- detail:null
|
|
|
+ detail: null,
|
|
|
+ isMobile: browser.mobile,
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
@@ -34,26 +75,32 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
- handleClickEvent(type,item){
|
|
|
-
|
|
|
+ handleClickEvent(type, item) {
|
|
|
switch (type) {
|
|
|
- case 'travelAround':
|
|
|
- this.$router.push({path:'/travel-around',query:{travelAround:item.travelAround}})
|
|
|
+ case "travelAround":
|
|
|
+ this.$router.push({
|
|
|
+ path: "/travel-around",
|
|
|
+ query: { travelAround: item.travelAround },
|
|
|
+ });
|
|
|
break;
|
|
|
- case 'overLook':
|
|
|
- this.$router.push({path:'/over-look',query:{overLook:item.overLook}})
|
|
|
+ case "overLook":
|
|
|
+ this.$router.push({
|
|
|
+ path: "/over-look",
|
|
|
+ query: { overLook: item.overLook },
|
|
|
+ });
|
|
|
break;
|
|
|
- case 'intensiveReading':
|
|
|
- window.open(item.intensiveReading,"_self")
|
|
|
+ case "intensiveReading":
|
|
|
+ window.open(item.intensiveReading, "_self");
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
this.detail = this.$route.query || {};
|
|
|
+ console.log("isMobile", this.isMobile);
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {},
|
|
@@ -68,13 +115,17 @@ export default {
|
|
|
</script>
|
|
|
<style lang='less' scoped>
|
|
|
//@import url(); 引入公共css类
|
|
|
+.root {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+// pc端样式
|
|
|
.layout {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- background: url("../../assets/images/inner-bg.png");
|
|
|
- background-size: cover;
|
|
|
+ background: url("../../assets/images/cards-bg.png") center center no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
overflow: hidden;
|
|
|
- background-clip: 100% 100%;
|
|
|
.title {
|
|
|
width: 1264px;
|
|
|
text-align: center;
|
|
@@ -95,7 +146,7 @@ export default {
|
|
|
background: url("../../assets/images/detail-con-bg.png") center center
|
|
|
no-repeat;
|
|
|
background-clip: 100% 100%;
|
|
|
- margin: 100px auto;
|
|
|
+ margin: 50px auto;
|
|
|
box-sizing: border-box;
|
|
|
padding: 10px;
|
|
|
font-size: 0;
|
|
@@ -142,4 +193,87 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+//移动端样式
|
|
|
+@media screen and (max-width: 1024px) {
|
|
|
+.mobile-layout {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: #615310;
|
|
|
+ background-size: cover;
|
|
|
+ overflow: hidden;
|
|
|
+ background-clip: 100% 100%;
|
|
|
+ .mobile-card {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ padding: 3vw;
|
|
|
+ .mobile-content {
|
|
|
+ width: 100%;
|
|
|
+ background: url('../../assets/images/mobile-detail-card-bg.png') no-repeat center center;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .pic {
|
|
|
+ width: 100%;
|
|
|
+ height: 40%;
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .txt {
|
|
|
+ width: 100%;
|
|
|
+ height: 45%;
|
|
|
+ padding: 3vw;
|
|
|
+ // background: blue;
|
|
|
+ .title {
|
|
|
+ height: 15%;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 5vw;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 10vw;
|
|
|
+ color: #fcd67b;
|
|
|
+ opacity: 1;
|
|
|
+ // margin: 4vw 0;
|
|
|
+ }
|
|
|
+ .con {
|
|
|
+ padding: 3vw;
|
|
|
+ height: 85%;
|
|
|
+ font-size: 3.5vw;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: 300;
|
|
|
+ line-height: 5.5vw;
|
|
|
+ color: #ffffff;
|
|
|
+ opacity: 1;
|
|
|
+ overflow: auto;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btns {
|
|
|
+ width: 100%;
|
|
|
+ height: 15%;
|
|
|
+ padding: 6vw;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ .left-btn{background: url(../../assets/images/left-btn.png) no-repeat;}
|
|
|
+ .center-btn{background: url(../../assets/images/center-btn.png) no-repeat;}
|
|
|
+ .right-btn{background: url(../../assets/images/right-btn.png) no-repeat;}
|
|
|
+ .btn {
|
|
|
+ width: 32%;
|
|
|
+ height: 80%;
|
|
|
+ line-height:2.5rem;
|
|
|
+ text-align: center;
|
|
|
+ // background: url(../../assets/images/btn-bg.png) no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 16px;
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #6A2121;
|
|
|
+ opacity: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+}
|
|
|
</style>
|