|
@@ -4,18 +4,36 @@
|
|
|
<!-- 关闭按钮 -->
|
|
|
<div class="closeX" @click="$emit('close')">
|
|
|
<img
|
|
|
- :style="{ width: screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px', height: screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px' }"
|
|
|
- src="../../../assets/img/closeX.png" alt="" />
|
|
|
+ :style="{
|
|
|
+ width:
|
|
|
+ screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px',
|
|
|
+ height:
|
|
|
+ screenWidth > 1000 ? parseInt(screenWidth / 32) + 'px' : '40px',
|
|
|
+ }"
|
|
|
+ src="../../../assets/img/closeX.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="top">
|
|
|
- <img :style="{ width: screenWidth > 1000 ? parseInt(screenWidth / 27) + 'px' : '70px' }"
|
|
|
- src="../../../assets/img/hotTop.png" alt="" />
|
|
|
+ <img
|
|
|
+ :style="{
|
|
|
+ width:
|
|
|
+ screenWidth > 1000 ? parseInt(screenWidth / 27) + 'px' : '70px',
|
|
|
+ }"
|
|
|
+ src="../../../assets/img/hotTop.png"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="main">
|
|
|
<div class="txtNone" v-if="data.length === 0">暂无热点</div>
|
|
|
<div class="txt" v-else>
|
|
|
- <span :class="{ active: hotInd === index }" @click="openHot(item, index)" v-for="(item, index) in data"
|
|
|
- :key="index">{{ item.info.title ? item.info.title : "热点" }}</span>
|
|
|
+ <span
|
|
|
+ :class="{ active: hotInd === index }"
|
|
|
+ @click="openHot(item, index)"
|
|
|
+ v-for="(item, index) in data"
|
|
|
+ :key="index"
|
|
|
+ >{{ item.info.title ? item.info.title : "热点" }}</span
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -41,8 +59,8 @@ export default {
|
|
|
watch: {
|
|
|
screenWidth: {
|
|
|
handler: function (val, oldVal) {
|
|
|
- this.dialogWidth = val
|
|
|
- console.log('热点打开', this.dialogWidth)
|
|
|
+ this.dialogWidth = val;
|
|
|
+ console.log("热点打开", this.dialogWidth);
|
|
|
},
|
|
|
},
|
|
|
},
|
|
@@ -51,6 +69,7 @@ export default {
|
|
|
openHot(e, index) {
|
|
|
// 停止自动导览
|
|
|
window.player.director.stopTour();
|
|
|
+ console.log("热点打开被触发", e, index, window.myHotList);
|
|
|
setTimeout(() => {
|
|
|
e && e.examine(window.player, true);
|
|
|
this.hotInd = index;
|
|
@@ -59,28 +78,28 @@ export default {
|
|
|
},
|
|
|
//生命周期 - 创建完成(可以访问当前this实例)
|
|
|
created() {
|
|
|
- console.log('-------------',window.myHotList );
|
|
|
+ console.log("-------------", window.myHotList);
|
|
|
this.data = window.myHotList || [];
|
|
|
},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- this.screenWidth = document.body.clientWidth
|
|
|
+ this.screenWidth = document.body.clientWidth;
|
|
|
window.onresize = () => {
|
|
|
return (() => {
|
|
|
- this.screenWidth = document.body.clientWidth
|
|
|
- })()
|
|
|
- }
|
|
|
+ this.screenWidth = document.body.clientWidth;
|
|
|
+ })();
|
|
|
+ };
|
|
|
},
|
|
|
- beforeCreate() { }, //生命周期 - 创建之前
|
|
|
- beforeMount() { }, //生命周期 - 挂载之前
|
|
|
- beforeUpdate() { }, //生命周期 - 更新之前
|
|
|
- updated() { }, //生命周期 - 更新之后
|
|
|
- beforeDestroy() { }, //生命周期 - 销毁之前
|
|
|
- destroyed() { }, //生命周期 - 销毁完成
|
|
|
- activated() { }, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
+ beforeCreate() {}, //生命周期 - 创建之前
|
|
|
+ beforeMount() {}, //生命周期 - 挂载之前
|
|
|
+ beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
+ updated() {}, //生命周期 - 更新之后
|
|
|
+ beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
+ destroyed() {}, //生命周期 - 销毁完成
|
|
|
+ activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
};
|
|
|
</script>
|
|
|
-<style lang='less' scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
.hotspot {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
@@ -127,7 +146,7 @@ export default {
|
|
|
transform: translateX(-50%);
|
|
|
}
|
|
|
|
|
|
- &>img {
|
|
|
+ & > img {
|
|
|
min-width: 40px;
|
|
|
min-height: 40px;
|
|
|
max-width: 160px;
|
|
@@ -145,7 +164,7 @@ export default {
|
|
|
top: auto;
|
|
|
}
|
|
|
|
|
|
- &>img {
|
|
|
+ & > img {
|
|
|
width: 70px;
|
|
|
}
|
|
|
}
|
|
@@ -181,14 +200,13 @@ export default {
|
|
|
@media screen and (min-width: 1000px) {
|
|
|
height: 76%;
|
|
|
margin-top: 20%;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@media screen and (min-width: 1921px) {
|
|
|
font-size: 43px;
|
|
|
}
|
|
|
|
|
|
- &>span {
|
|
|
+ & > span {
|
|
|
margin-top: 20px;
|
|
|
cursor: pointer;
|
|
|
display: block;
|
|
@@ -219,4 +237,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|