|
@@ -9,23 +9,36 @@
|
|
|
:src="urlToFitFu(audio)"
|
|
|
controls
|
|
|
></audio>
|
|
|
- <!-- 音频图标 -->
|
|
|
- <div
|
|
|
- class="audioIcon"
|
|
|
- v-if="audio && !isOneAduio"
|
|
|
- @click="audioSta = !audioSta"
|
|
|
- :title="audioSta ? '关闭音频' : '打开音频'"
|
|
|
- >
|
|
|
- <img
|
|
|
- :src="
|
|
|
- require(`@/assets/images/pc/audio${audioSta ? 'Ac' : ''}.png`)
|
|
|
- "
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <!-- 音频图标 v-if="audio && !isOneAduio"-->
|
|
|
+ <div class="iconList">
|
|
|
+ <div
|
|
|
+ class="audioIcon"
|
|
|
+ @click="audioSta = !audioSta"
|
|
|
+ :title="audioSta ? '关闭音频' : '打开音频'"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require(`@/assets/images/pc/audio${audioSta ? 'Ac' : ''}.png`)
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ class="audioIcon"
|
|
|
+ @click="audioSta = !audioSta"
|
|
|
+ :title="audioSta ? '关闭音频' : '打开音频'"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ :src="
|
|
|
+ require(`@/assets/images/pc/yuyan.png`)
|
|
|
+ "
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<!-- 如果只有一个模块 -->
|
|
|
- <div
|
|
|
+ <!-- <div
|
|
|
class="oneTabNum"
|
|
|
v-if="
|
|
|
flooTab.length === 1 &&
|
|
@@ -35,10 +48,10 @@
|
|
|
"
|
|
|
>
|
|
|
{{ myInd + 1 }} / {{ data[myType].length }}
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 底部的tab -->
|
|
|
- <div class="flooTabBox" v-if="flooTab.length > 1">
|
|
|
+ <!-- <div class="flooTabBox" v-if="flooTab.length > 1">
|
|
|
<div
|
|
|
@click="myType = item.type"
|
|
|
class="tabRow"
|
|
@@ -65,35 +78,36 @@
|
|
|
}}{{ data[item.type].length }}</span
|
|
|
>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- 主要内容 -->
|
|
|
|
|
|
<div class="contenBoxMain">
|
|
|
+ <img class="logo" src="../assets/logo.png" alt="" />
|
|
|
<div
|
|
|
class="contenBox"
|
|
|
:class="{ contenBoxAc: index === myInd }"
|
|
|
- v-for="(item, index) in data[myType]"
|
|
|
- :key="myType === 'video' ? item.url : item"
|
|
|
+ v-for="(item, index) in activeObj.images"
|
|
|
+ :key="index"
|
|
|
>
|
|
|
<!-- 模型页面 -->
|
|
|
- <div class="modelBox" v-if="myType === 'model'">
|
|
|
+ <!-- <div class="modelBox" v-if="myType === 'model'">
|
|
|
<iframe
|
|
|
:src="urlToFitFu(item)"
|
|
|
frameborder="0"
|
|
|
v-if="index === myInd"
|
|
|
></iframe>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<!-- 视频页面 -->
|
|
|
- <div class="videoBox" v-else-if="myType === 'video'">
|
|
|
+ <!-- <div class="videoBox" v-else-if="myType === 'video'">
|
|
|
<video
|
|
|
controls
|
|
|
:src="urlToFitFu(item.url)"
|
|
|
v-if="index === myInd"
|
|
|
></video>
|
|
|
- </div>
|
|
|
- <!-- 图片页面 -->
|
|
|
- <div class="imgBox" v-else-if="myType === 'img'">
|
|
|
+ </div> -->
|
|
|
+ <!-- 图片页面 v-if="myType === 'img'"-->
|
|
|
+ <div class="imgBox">
|
|
|
<div class="smImgBox" @click="lookImg(urlToFitFu(item))">
|
|
|
<img v-lazy="urlToFitFu(item)" alt="" />
|
|
|
</div>
|
|
@@ -104,29 +118,30 @@
|
|
|
@click="cutMyInd(-1, myInd === 0)"
|
|
|
class="leftJJ awccJJ"
|
|
|
:class="{ noClick: myInd === 0 }"
|
|
|
- v-if="data[myType] && data[myType].length > 1"
|
|
|
+ v-if="activeObj.images && activeObj.images.length > 1"
|
|
|
></div>
|
|
|
<div
|
|
|
- @click="cutMyInd(1, myInd === data[myType].length - 1)"
|
|
|
+ @click="cutMyInd(1, myInd === activeObj.images.length - 1)"
|
|
|
class="rightJJ awccJJ"
|
|
|
- :class="{ noClick: myInd === data[myType].length - 1 }"
|
|
|
- v-if="data[myType] && data[myType].length > 1"
|
|
|
+ :class="{ noClick: myInd === activeObj.images.length - 1 }"
|
|
|
+ v-if="activeObj.images && activeObj.images.length > 1"
|
|
|
></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
+ <div class="changeList">
|
|
|
+ <div class="list">
|
|
|
+ <div class="item" @click="activeObj = element;myInd = 0" v-for="element in list" :key="element.title" :class="{active: element.id == activeObj.id}">
|
|
|
+ {{ element.title }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 下面的文字介绍 -->
|
|
|
- <div class="flooTxt" :class="{ flooTxtOne: oneTxt }">
|
|
|
+ <div class="flooTxt" v-if="activeObj.images[myInd]">
|
|
|
<div class="flooTxtBox">
|
|
|
- <div class="myTitle">{{ myTitle }}</div>
|
|
|
- <!-- 视频的介绍 -->
|
|
|
- <div class="myTxt" v-if="myType === 'video' && videoTxt[myInd]">
|
|
|
- {{ videoTxt[myInd] }}
|
|
|
- </div>
|
|
|
- <div class="myTxt" v-if="myType === 'img' && imgTxt[myInd]">
|
|
|
- {{ imgTxt[myInd] }}
|
|
|
+ <div class="myTitle">{{ activeObj.images[myInd].title_zh }}</div>
|
|
|
+ <div class="myTxt">
|
|
|
+ {{ activeObj.images[myInd].text_zh }}
|
|
|
</div>
|
|
|
- <div class="myTxt" v-html="myTxt"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -139,6 +154,8 @@
|
|
|
|
|
|
|
|
|
<script>
|
|
|
+import myData from "./data.json";
|
|
|
+
|
|
|
export default {
|
|
|
name: "Home",
|
|
|
data() {
|
|
@@ -151,37 +168,15 @@ export default {
|
|
|
isOneAduio: false,
|
|
|
// 音频状态
|
|
|
audioSta: false,
|
|
|
-
|
|
|
- data: {
|
|
|
- // 模型数组
|
|
|
- model: [],
|
|
|
- // 视频数组
|
|
|
- video: [],
|
|
|
- // 图片数组
|
|
|
- img: [],
|
|
|
- },
|
|
|
- // 当前 type
|
|
|
- myType: "",
|
|
|
-
|
|
|
- // 底部的tab
|
|
|
- flooTab: [],
|
|
|
-
|
|
|
- // 当前索引
|
|
|
myInd: 0,
|
|
|
-
|
|
|
+ // 当前 type
|
|
|
+ list: [],
|
|
|
// 查看图片
|
|
|
lookPics: [],
|
|
|
-
|
|
|
- // 标题
|
|
|
- myTitle: "",
|
|
|
- // 内容
|
|
|
- myTxt: "",
|
|
|
- // 视频内容
|
|
|
- videoTxt: [],
|
|
|
- imgTxt: [],
|
|
|
-
|
|
|
- // 只有标题和文字(没有视频,没有模型,没有图片)
|
|
|
- oneTxt: false,
|
|
|
+ activeObj: {
|
|
|
+ id: 1,
|
|
|
+ images: [],
|
|
|
+ },
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -205,82 +200,46 @@ export default {
|
|
|
methods: {
|
|
|
// 本地化 url 适配
|
|
|
urlToFitFu(url) {
|
|
|
- return url
|
|
|
+ return url.url || url;
|
|
|
// const resUrl = url;
|
|
|
// if (url.includes("https://super.4dage.com")) {
|
|
|
// return url.replace("https://super.4dage.com", "");
|
|
|
// } else if (url.includes("http://super.4dage.com")) {
|
|
|
// return url.replace("http://super.4dage.com", "");
|
|
|
- // } else return resUrl;
|
|
|
+ // } else return resUrl;
|
|
|
},
|
|
|
|
|
|
// 点击左右箭头
|
|
|
cutMyInd(num, flag) {
|
|
|
if (flag) return;
|
|
|
this.myInd += num;
|
|
|
+ this.activeObj = this.data[this.myType][this.myInd];
|
|
|
+ console.log("----num", this.activeObj, "flag", flag, this.myInd);
|
|
|
},
|
|
|
// 点击查看大图
|
|
|
lookImg(url) {
|
|
|
let dom = this.$refs.viewer.$viewer;
|
|
|
- this.lookPics = [url];
|
|
|
+ this.lookPics = [url.url || url];
|
|
|
dom.show();
|
|
|
},
|
|
|
async getData() {
|
|
|
+ console.log("----myData", myData);
|
|
|
// https://www.4dmodel.com/
|
|
|
|
|
|
- let url = `https://super.4dage.com/data/${ // 线上数据
|
|
|
+ // let url = `https://super.4dage.com/data/${ // 线上数据
|
|
|
|
|
|
// let url = `/data/${
|
|
|
- //本地化部署
|
|
|
- this.id
|
|
|
- }/hot/js/data.js?time=${Math.random()}`;
|
|
|
- let result = (await this.$http.get(url)).data;
|
|
|
- const resData = result[this.m];
|
|
|
- // console.log("----", resData);
|
|
|
- if (resData) {
|
|
|
- this.audio = resData.backgroundMusic;
|
|
|
- // 只有单独的音频上传
|
|
|
- if (
|
|
|
- resData.backgroundMusic &&
|
|
|
- !resData.model &&
|
|
|
- !resData.video &&
|
|
|
- !resData.images
|
|
|
- ) {
|
|
|
- this.isOneAduio = true;
|
|
|
- }
|
|
|
- // 底部的tab
|
|
|
- const arr = [];
|
|
|
- const obj = {};
|
|
|
- if (resData.model) {
|
|
|
- obj.model = resData.model;
|
|
|
- arr.push({ id: 1, type: "model", name: "模型" });
|
|
|
- }
|
|
|
- if (resData.video) {
|
|
|
- obj.video = resData.video;
|
|
|
- arr.push({ id: 2, type: "video", name: "视频" });
|
|
|
- }
|
|
|
- if (resData.images) {
|
|
|
- obj.img = resData.images;
|
|
|
- arr.push({ id: 3, type: "img", name: "图片" });
|
|
|
- }
|
|
|
- this.flooTab = arr;
|
|
|
- this.data = obj;
|
|
|
-
|
|
|
- // 当前type的值 应该为
|
|
|
- if (resData.model) this.myType = "model";
|
|
|
- else if (resData.video) this.myType = "video";
|
|
|
- else if (resData.images) this.myType = "img";
|
|
|
-
|
|
|
- this.myTitle = resData.title || "";
|
|
|
- this.myTxt = resData.content || "";
|
|
|
- this.videoTxt = resData.videosDesc || [];
|
|
|
- this.imgTxt = resData.imagesDesc || [];
|
|
|
-
|
|
|
- // 只有 标题和 文字介绍(没有视频,没有模型,没有图片)
|
|
|
- if (!obj.model && !obj.video && !obj.img && !resData.backgroundMusic) {
|
|
|
- this.oneTxt = true;
|
|
|
- }
|
|
|
- }
|
|
|
+ // //本地化部署
|
|
|
+ // this.id
|
|
|
+ // }/hot/js/data.js?time=${Math.random()}`;
|
|
|
+ // let url = `/hot/js/data.js?time=${Math.random()}`;
|
|
|
+ // let result = (await this.$http.get(url)).data;
|
|
|
+ const resData = myData;
|
|
|
+ this.list = resData;
|
|
|
+ let showData = resData && resData[0];
|
|
|
+ this.activeObj = {
|
|
|
+ ...showData,
|
|
|
+ };
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
@@ -309,22 +268,67 @@ export default {
|
|
|
height: 60px;
|
|
|
}
|
|
|
.main {
|
|
|
- width: 1200px;
|
|
|
+ width: 1350px;
|
|
|
margin: 0 auto;
|
|
|
- height: 100%;
|
|
|
- padding-top: 40px;
|
|
|
+ height: 825px;
|
|
|
+ padding-top: 95px;
|
|
|
+ .changeList {
|
|
|
+ width: 630px;
|
|
|
+ height: 32px;
|
|
|
+ width: 630px;
|
|
|
+ height: 32px;
|
|
|
+ position: absolute;
|
|
|
+ left: calc(50% - 315px);
|
|
|
+ bottom: 286px;
|
|
|
+ .list {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .active{
|
|
|
+ opacity: 1;
|
|
|
+ color: #02362C;
|
|
|
+ }
|
|
|
+ div {
|
|
|
+ height: 100%;
|
|
|
+ padding: 8px 7px 10px 7px;
|
|
|
+ min-width: 70px;
|
|
|
+ text-align: center;
|
|
|
+ background: #dde5e2;
|
|
|
+ border-radius: 7px;
|
|
|
+ font-family: Source Han Serif CN;
|
|
|
+ font-weight: 500;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #02362c;
|
|
|
+ line-height: 14px;
|
|
|
+ opacity: 0.79;
|
|
|
+ margin-right: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
.mainCon {
|
|
|
+ background-image: url("../assets/bg.png");
|
|
|
+ background-size: 100% 100%;
|
|
|
position: relative;
|
|
|
border-radius: 6px;
|
|
|
overflow: hidden;
|
|
|
width: 100%;
|
|
|
- height: calc(100% - 200px);
|
|
|
+ height: 100%;
|
|
|
+
|
|
|
+ .iconList{
|
|
|
+ position: absolute;
|
|
|
+ bottom: 182px;
|
|
|
+ right: 237px;
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
.audioIcon {
|
|
|
z-index: 10;
|
|
|
cursor: pointer;
|
|
|
- position: absolute;
|
|
|
- right: 20px;
|
|
|
- bottom: 30px;
|
|
|
+ position: relative;
|
|
|
+ // right: 20px;
|
|
|
+ // bottom: 278px;
|
|
|
+ width: 62px;
|
|
|
+ img {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
.oneTabNum {
|
|
|
z-index: 10;
|
|
@@ -365,13 +369,19 @@ export default {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ .logo {
|
|
|
+ position: absolute;
|
|
|
+ left: 52px;
|
|
|
+ top: 37px;
|
|
|
+ height: 60px;
|
|
|
+ }
|
|
|
}
|
|
|
.contenBox {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
+ width: 630px;
|
|
|
+ height: 355px;
|
|
|
position: absolute;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
+ top: 123px;
|
|
|
+ left: calc(50% - 315px);
|
|
|
opacity: 0;
|
|
|
pointer-events: none;
|
|
|
transition: all 0.5s;
|
|
@@ -381,6 +391,7 @@ export default {
|
|
|
.imgBox {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
}
|
|
|
.modelBox {
|
|
|
iframe {
|
|
@@ -389,14 +400,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.videoBox {
|
|
|
- padding: 100px 100px 120px;
|
|
|
+ // padding: 100px 100px 120px;
|
|
|
video {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ object-fit: cover;
|
|
|
}
|
|
|
}
|
|
|
.imgBox {
|
|
|
- padding: 100px 100px 120px;
|
|
|
+ // padding: 100px 100px 120px;
|
|
|
.smImgBox {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -405,7 +417,7 @@ export default {
|
|
|
pointer-events: none;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
- object-fit: contain;
|
|
|
+ object-fit: cover;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -417,12 +429,12 @@ export default {
|
|
|
.awccJJ {
|
|
|
cursor: pointer;
|
|
|
position: absolute;
|
|
|
- top: 50%;
|
|
|
+ top: 42%;
|
|
|
transform: translateY(-50%);
|
|
|
- left: 10px;
|
|
|
- width: 37px;
|
|
|
- height: 37px;
|
|
|
- background-image: url("../assets/images/pc/left.png");
|
|
|
+ left: 266px;
|
|
|
+ width: 48px;
|
|
|
+ height: 60px;
|
|
|
+ background-image: url("../assets/images/icon/left.png");
|
|
|
background-size: 100% 100%;
|
|
|
&:focus {
|
|
|
outline: none;
|
|
@@ -430,8 +442,8 @@ export default {
|
|
|
}
|
|
|
.rightJJ {
|
|
|
left: auto;
|
|
|
- right: 10px;
|
|
|
- background-image: url("../assets/images/pc/right.png");
|
|
|
+ right: 266px;
|
|
|
+ background-image: url("../assets/images/icon/right.png");
|
|
|
}
|
|
|
.noClick {
|
|
|
cursor: default;
|
|
@@ -440,22 +452,27 @@ export default {
|
|
|
}
|
|
|
.flooTxt {
|
|
|
margin-top: 20px;
|
|
|
- width: 100%;
|
|
|
- height: 160px;
|
|
|
+ width: 80%;
|
|
|
+ height: 135px;
|
|
|
+ margin: 0 auto;
|
|
|
+ position: relative;
|
|
|
+ top: -137px;
|
|
|
.flooTxtBox {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
overflow-y: auto;
|
|
|
.myTitle {
|
|
|
- color: #b90c0c;
|
|
|
+ color: #DDE5E2;
|
|
|
font-size: 22px;
|
|
|
font-weight: 700;
|
|
|
margin-bottom: 10px;
|
|
|
}
|
|
|
.myTxt {
|
|
|
- font-size: 16px;
|
|
|
- color: #333333;
|
|
|
- line-height: 24px;
|
|
|
+ font-family: Adobe Heiti Std;
|
|
|
+ font-weight: normal;
|
|
|
+ font-size: 19px;
|
|
|
+ color: #DDE5E2;
|
|
|
+ line-height: 31px;
|
|
|
}
|
|
|
&::-webkit-scrollbar {
|
|
|
/*滚动条整体样式*/
|
|
@@ -496,7 +513,6 @@ export default {
|
|
|
top: 50%;
|
|
|
left: 50%;
|
|
|
transform: translate(-50%, -50%);
|
|
|
-
|
|
|
.mainCon {
|
|
|
border-radius: 8px 8px 0 0;
|
|
|
.audioIcon {
|