|
@@ -17,32 +17,19 @@
|
|
<div
|
|
<div
|
|
class="infoTxt"
|
|
class="infoTxt"
|
|
:class="{ videoAc: type === 'video' }"
|
|
:class="{ videoAc: type === 'video' }"
|
|
- v-if="item.title"
|
|
|
|
|
|
+ v-if="item.title || hotIdOrName.name"
|
|
>
|
|
>
|
|
- <h3>{{ item.title.split("&")[0] }}</h3>
|
|
|
|
|
|
+ <h3>{{ hotIdOrName.name }}</h3>
|
|
<div v-html="item.content" v-show="type !== 'video'"></div>
|
|
<div v-html="item.content" v-show="type !== 'video'"></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 图片 -->
|
|
<!-- 图片 -->
|
|
- <template v-if="type === 'image'">
|
|
|
|
|
|
+ <template v-if="type === 'img' || type === '2d'">
|
|
<img
|
|
<img
|
|
- @click="
|
|
|
|
- lookImg(
|
|
|
|
- `https://4dkk.4dage.com/scene_edit_data/${KKNum}/user/${item.media.image[0].src}`
|
|
|
|
- )
|
|
|
|
- "
|
|
|
|
- v-if="item.media && item.media.image[0]"
|
|
|
|
- v-lazy="
|
|
|
|
- `https://4dkk.4dage.com/scene_edit_data/${KKNum}/user/${item.media.image[0].src}`
|
|
|
|
- "
|
|
|
|
|
|
+ @click="lookImg(`hotData/${hotIdOrName.id}/${type}/${item.id}`)"
|
|
|
|
+ v-lazy="`hotData/${hotIdOrName.id}/${type}/${item.id}`"
|
|
alt=""
|
|
alt=""
|
|
/>
|
|
/>
|
|
- <img
|
|
|
|
- src="../assets/img/IMGerror.png"
|
|
|
|
- style="pointer-events: none"
|
|
|
|
- alt=""
|
|
|
|
- v-else
|
|
|
|
- />
|
|
|
|
</template>
|
|
</template>
|
|
<!-- 视频 -->
|
|
<!-- 视频 -->
|
|
<template v-else-if="type === 'video'">
|
|
<template v-else-if="type === 'video'">
|
|
@@ -92,6 +79,28 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
+ <!-- 查看图片的详细名称 -->
|
|
|
|
+ <div
|
|
|
|
+ class="imgNameBox"
|
|
|
|
+ v-show="type === 'img'"
|
|
|
|
+ :class="{ hideImgNameBox: !imgNameBox }"
|
|
|
|
+ >
|
|
|
|
+ <div
|
|
|
|
+ @click="Swiper.slideTo(index)"
|
|
|
|
+ class="row"
|
|
|
|
+ :class="{ rowAc: index === imgInd }"
|
|
|
|
+ :title="item.name"
|
|
|
|
+ v-for="(item, index) in data"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ >
|
|
|
|
+ {{ item.name }}
|
|
|
|
+ </div>
|
|
|
|
+ <!-- 收起按钮 -->
|
|
|
|
+ <div class="hideName" @click="imgNameBox = false">
|
|
|
|
+ <i class="el-icon-caret-right"></i>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<!-- 右下角的按钮 -->
|
|
<!-- 右下角的按钮 -->
|
|
<div class="mainrr">
|
|
<div class="mainrr">
|
|
<div
|
|
<div
|
|
@@ -111,13 +120,26 @@
|
|
alt=""
|
|
alt=""
|
|
/>
|
|
/>
|
|
|
|
|
|
- <p>{{ item.name }}{{ info[item.type] && info[item.type].length }}</p>
|
|
|
|
|
|
+ <!-- 图片类型才有的展开按钮 -->
|
|
|
|
+ <div
|
|
|
|
+ class="showName"
|
|
|
|
+ v-show="item.type === 'img' && !imgNameBox"
|
|
|
|
+ @click="imgNameBox = true"
|
|
|
|
+ >
|
|
|
|
+ <i class="el-icon-caret-top"></i>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <p>
|
|
|
|
+ {{ item.name }}{{ info[item.type] && info[item.type].length
|
|
|
|
+ }}{{ myinfo[item.type] && myinfo[item.type].length }}
|
|
|
|
+ </p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+import { hotData } from "./data";
|
|
import Audio from "./Audio.vue";
|
|
import Audio from "./Audio.vue";
|
|
import Swiper from "./swiper.js";
|
|
import Swiper from "./swiper.js";
|
|
export default {
|
|
export default {
|
|
@@ -126,6 +148,10 @@ export default {
|
|
type: Object,
|
|
type: Object,
|
|
default: () => {},
|
|
default: () => {},
|
|
},
|
|
},
|
|
|
|
+ hotIdOrName: {
|
|
|
|
+ type: Object,
|
|
|
|
+ default: () => {},
|
|
|
|
+ },
|
|
},
|
|
},
|
|
name: "Hot",
|
|
name: "Hot",
|
|
components: { Audio },
|
|
components: { Audio },
|
|
@@ -141,11 +167,16 @@ export default {
|
|
{ name: "视频", id: 1, show: false, type: "video" },
|
|
{ name: "视频", id: 1, show: false, type: "video" },
|
|
{ name: "模型", id: 2, show: false, type: "link" },
|
|
{ name: "模型", id: 2, show: false, type: "link" },
|
|
{ name: "音频", id: 3, show: false, type: "audio" },
|
|
{ name: "音频", id: 3, show: false, type: "audio" },
|
|
- { name: "图片", id: 4, show: false, type: "image" },
|
|
|
|
|
|
+ // 定制化
|
|
|
|
+ { name: "图片", id: 4, show: false, type: "img" },
|
|
|
|
+ { name: "二维", id: 5, show: false, type: "2d" },
|
|
],
|
|
],
|
|
Swiper: null,
|
|
Swiper: null,
|
|
KKNum: window.KKNum,
|
|
KKNum: window.KKNum,
|
|
audioIndex: 0,
|
|
audioIndex: 0,
|
|
|
|
+ myinfo: {},
|
|
|
|
+ imgInd: 0,
|
|
|
|
+ imgNameBox: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
//监听属性 类似于data概念
|
|
//监听属性 类似于data概念
|
|
@@ -153,6 +184,7 @@ export default {
|
|
//监控data中的数据变化
|
|
//监控data中的数据变化
|
|
watch: {
|
|
watch: {
|
|
type(val) {
|
|
type(val) {
|
|
|
|
+ // console.log('-----------',val);
|
|
if (val === "video") {
|
|
if (val === "video") {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -163,7 +195,14 @@ export default {
|
|
} else if (val === "audio") this.audioIndex = 0;
|
|
} else if (val === "audio") this.audioIndex = 0;
|
|
|
|
|
|
this.Swiper = null;
|
|
this.Swiper = null;
|
|
- this.data = this.info[val];
|
|
|
|
|
|
+
|
|
|
|
+ // 定制化
|
|
|
|
+ this.imgInd = 0;
|
|
|
|
+ this.imgNameBox = true;
|
|
|
|
+ const flag = ["img", "2d"];
|
|
|
|
+ if (flag.includes(val)) {
|
|
|
|
+ this.data = this.myinfo[val];
|
|
|
|
+ } else this.data = this.info[val];
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.Swiper = new Swiper(".Hot .swiper-container", {
|
|
this.Swiper = new Swiper(".Hot .swiper-container", {
|
|
@@ -200,6 +239,9 @@ export default {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
if (val === "audio") this.audioIndex = this.Swiper.activeIndex;
|
|
if (val === "audio") this.audioIndex = this.Swiper.activeIndex;
|
|
|
|
+ if (flag.includes(val)) {
|
|
|
|
+ this.imgInd = this.Swiper.activeIndex;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|
|
});
|
|
@@ -209,6 +251,9 @@ export default {
|
|
|
|
|
|
info: {
|
|
info: {
|
|
handler(val) {
|
|
handler(val) {
|
|
|
|
+ // 通过id获取配置化信息
|
|
|
|
+ // console.log("------------------------", this.hotIdOrName);
|
|
|
|
+ const myinfo = hotData.find((v) => v.hotId === this.hotIdOrName.id);
|
|
this.info = val;
|
|
this.info = val;
|
|
let obj = {
|
|
let obj = {
|
|
video: 0,
|
|
video: 0,
|
|
@@ -219,7 +264,17 @@ export default {
|
|
for (const k in val) {
|
|
for (const k in val) {
|
|
if (val[k].length) this.rightList[obj[k]].show = true;
|
|
if (val[k].length) this.rightList[obj[k]].show = true;
|
|
}
|
|
}
|
|
- if (val["image"] && val["image"].length) this.type = "image";
|
|
|
|
|
|
+ // 定制化
|
|
|
|
+ if (myinfo) {
|
|
|
|
+ this.myinfo = myinfo;
|
|
|
|
+ if (myinfo.img && myinfo.img.length) this.rightList[3].show = true;
|
|
|
|
+ if (myinfo["2d"] && myinfo["2d"].length)
|
|
|
|
+ this.rightList[4].show = true;
|
|
|
|
+ }
|
|
|
|
+ if (myinfo && myinfo.img && myinfo.img.length) this.type = "img";
|
|
|
|
+ else if (myinfo && myinfo["2d"] && myinfo["2d"].length)
|
|
|
|
+ this.type = "2d";
|
|
|
|
+ // if (val["image"] && val["image"].length) this.type = "image";
|
|
else if (val["video"] && val["video"].length) this.type = "video";
|
|
else if (val["video"] && val["video"].length) this.type = "video";
|
|
else if (val["link"] && val["link"].length) this.type = "link";
|
|
else if (val["link"] && val["link"].length) this.type = "link";
|
|
else if (val["audio"] && val["audio"].length) this.type = "audio";
|
|
else if (val["audio"] && val["audio"].length) this.type = "audio";
|
|
@@ -334,6 +389,17 @@ export default {
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .showName {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 998;
|
|
|
|
+ top: -20px;
|
|
|
|
+ left: 5px;
|
|
|
|
+ width: 40px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
.swBox {
|
|
.swBox {
|
|
@@ -456,6 +522,79 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .imgNameBox {
|
|
|
|
+ opacity: 1;
|
|
|
|
+ transition: all 0.3s;
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 998;
|
|
|
|
+ width: 400px;
|
|
|
|
+ padding: 10px 20px 20px;
|
|
|
|
+ right: 0;
|
|
|
|
+ bottom: 100px;
|
|
|
|
+ background-image: url("../assets/img/Hot/nameBac.png");
|
|
|
|
+ background-size: 100% 100%;
|
|
|
|
+ border-radius: 6px;
|
|
|
|
+ max-height: 700px;
|
|
|
|
+ &::-webkit-scrollbar {
|
|
|
|
+ /*滚动条整体样式*/
|
|
|
|
+ width: 5px;
|
|
|
|
+ /*高宽分别对应横竖滚动条的尺寸*/
|
|
|
|
+ height: 1px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &::-webkit-scrollbar-thumb {
|
|
|
|
+ /*滚动条里面小方块*/
|
|
|
|
+ border-radius: 1px;
|
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
|
+ background: #d8b275;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ &::-webkit-scrollbar-track {
|
|
|
|
+ /*滚动条里面轨道*/
|
|
|
|
+ -webkit-box-shadow: inset 0 0 5px transparent;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ background: transparent;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .row {
|
|
|
|
+ width: 100%;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ color: #fff;
|
|
|
|
+ height: 50px;
|
|
|
|
+ line-height: 49px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ border-bottom: 1px solid #fff;
|
|
|
|
+ &:hover {
|
|
|
|
+ color: #d8b275;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .rowAc {
|
|
|
|
+ color: #d8b275;
|
|
|
|
+ pointer-events: none;
|
|
|
|
+ }
|
|
|
|
+ .hideName {
|
|
|
|
+ position: absolute;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ top: 50%;
|
|
|
|
+ left: -20px;
|
|
|
|
+ transform: translateY(-50%);
|
|
|
|
+ width: 40px;
|
|
|
|
+ height: 40px;
|
|
|
|
+ border-radius: 50%;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: #930909;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .hideImgNameBox {
|
|
|
|
+ opacity: 0;
|
|
|
|
+ right: -400px;
|
|
|
|
+ .hideName {
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.active {
|
|
.active {
|
|
opacity: 1;
|
|
opacity: 1;
|