|
@@ -1,24 +1,43 @@
|
|
<template>
|
|
<template>
|
|
<div class="hotspot-detail-3">
|
|
<div class="hotspot-detail-3">
|
|
<img
|
|
<img
|
|
- v-show="state === 1"
|
|
|
|
|
|
+ v-show="state === 1 && innerWidth < 768"
|
|
class="bg-img"
|
|
class="bg-img"
|
|
src="@/assets/images/hots-detail-bg-state1.png"
|
|
src="@/assets/images/hots-detail-bg-state1.png"
|
|
alt=""
|
|
alt=""
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
- v-show="state === 2"
|
|
|
|
|
|
+ v-show="state === 2 && innerWidth < 768"
|
|
class="bg-img"
|
|
class="bg-img"
|
|
src="@/assets/images/hots-detail-bg-state2.png"
|
|
src="@/assets/images/hots-detail-bg-state2.png"
|
|
alt=""
|
|
alt=""
|
|
>
|
|
>
|
|
<img
|
|
<img
|
|
- v-show="state === 3"
|
|
|
|
|
|
+ v-show="state === 3 && innerWidth < 768"
|
|
class="bg-img"
|
|
class="bg-img"
|
|
src="@/assets/images/hots-detail-bg-state3.png"
|
|
src="@/assets/images/hots-detail-bg-state3.png"
|
|
alt=""
|
|
alt=""
|
|
>
|
|
>
|
|
|
|
|
|
|
|
+ <img
|
|
|
|
+ v-show="state === 1 && innerWidth >= 768"
|
|
|
|
+ class="bg-img"
|
|
|
|
+ src="@/assets/images/hots-detail-bg-state1-768.jpg"
|
|
|
|
+ alt=""
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ v-show="state === 2 && innerWidth >= 768"
|
|
|
|
+ class="bg-img"
|
|
|
|
+ src="@/assets/images/hots-detail-bg-state2-768.jpg"
|
|
|
|
+ alt=""
|
|
|
|
+ >
|
|
|
|
+ <img
|
|
|
|
+ v-show="state === 3 && innerWidth >= 768"
|
|
|
|
+ class="bg-img"
|
|
|
|
+ src="@/assets/images/hots-detail-bg-state3-768.jpg"
|
|
|
|
+ alt=""
|
|
|
|
+ >
|
|
|
|
+
|
|
<!-- 阴影 -->
|
|
<!-- 阴影 -->
|
|
<img
|
|
<img
|
|
class="shadow-box"
|
|
class="shadow-box"
|
|
@@ -28,7 +47,7 @@
|
|
|
|
|
|
<img
|
|
<img
|
|
class="content1"
|
|
class="content1"
|
|
- :src="hots3StateContent1"
|
|
|
|
|
|
+ :src=" innerWidth >= 768 ? hots3StateContent1768: hots3StateContent1"
|
|
:style="{
|
|
:style="{
|
|
opacity: state === 1 ? 1 : 0,
|
|
opacity: state === 1 ? 1 : 0,
|
|
}"
|
|
}"
|
|
@@ -95,6 +114,10 @@ import useSizeAdapt from "@/useFunctions/useSizeAdapt"
|
|
|
|
|
|
const emit = defineEmits(["close"])
|
|
const emit = defineEmits(["close"])
|
|
|
|
|
|
|
|
+const innerWidth = computed(() => {
|
|
|
|
+ return window.innerWidth
|
|
|
|
+})
|
|
|
|
+
|
|
// 三个背景图
|
|
// 三个背景图
|
|
import hots3StateBg1 from "@/assets/images/hots-detail-bg-state1.png"
|
|
import hots3StateBg1 from "@/assets/images/hots-detail-bg-state1.png"
|
|
import hots3StateBg2 from "@/assets/images/hots-detail-bg-state2.png"
|
|
import hots3StateBg2 from "@/assets/images/hots-detail-bg-state2.png"
|
|
@@ -117,6 +140,9 @@ import hots3StateShadow3 from "@/assets/images/img_shadow_3.png"
|
|
|
|
|
|
// 三个内容
|
|
// 三个内容
|
|
import hots3StateContent1 from "@/assets/images/hots-detail-content-state1.png"
|
|
import hots3StateContent1 from "@/assets/images/hots-detail-content-state1.png"
|
|
|
|
+import hots3StateContent1768 from "@/assets/images/hots-detail-content-state1-768.png"
|
|
|
|
+
|
|
|
|
+
|
|
import hots3StateContent2 from "@/assets/images/hots-detail-content-state2.png"
|
|
import hots3StateContent2 from "@/assets/images/hots-detail-content-state2.png"
|
|
import hots3StateContent3 from "@/assets/images/hots-detail-content-state3.png"
|
|
import hots3StateContent3 from "@/assets/images/hots-detail-content-state3.png"
|
|
|
|
|
|
@@ -147,7 +173,7 @@ const goState2 = () => {
|
|
const allWidth = document
|
|
const allWidth = document
|
|
.getElementById("content2Img")
|
|
.getElementById("content2Img")
|
|
.getBoundingClientRect().width
|
|
.getBoundingClientRect().width
|
|
- content2Dom.value.scrollLeft = allWidth * x
|
|
|
|
|
|
+ content2Dom.value.scrollLeft = allWidth * x - 140
|
|
isShowOperationTip.value = true
|
|
isShowOperationTip.value = true
|
|
}
|
|
}
|
|
}, 5)
|
|
}, 5)
|
|
@@ -211,6 +237,10 @@ const handleScroll = () => {
|
|
@media screen and (min-width: 768px) {
|
|
@media screen and (min-width: 768px) {
|
|
width: 65%;
|
|
width: 65%;
|
|
max-width: auto;
|
|
max-width: auto;
|
|
|
|
+ bottom: calc(
|
|
|
|
+ 105 / v-bind("windowSizeWhenDesignForRef") *
|
|
|
|
+ v-bind("windowSizeInCssForRef")
|
|
|
|
+ );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -228,6 +258,9 @@ const handleScroll = () => {
|
|
img {
|
|
img {
|
|
// height: 50vh;
|
|
// height: 50vh;
|
|
width: 990px;
|
|
width: 990px;
|
|
|
|
+ @media screen and (min-width: 768px) {
|
|
|
|
+ width: 1324px;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -237,7 +270,7 @@ const handleScroll = () => {
|
|
transition: opacity 1s ease;
|
|
transition: opacity 1s ease;
|
|
// 适配平板
|
|
// 适配平板
|
|
@media screen and (min-width: 768px) {
|
|
@media screen and (min-width: 768px) {
|
|
- width: 80%;
|
|
|
|
|
|
+ width: 70%;
|
|
left: 50%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
transform: translateX(-50%);
|
|
}
|
|
}
|
|
@@ -264,6 +297,9 @@ const handleScroll = () => {
|
|
35 / v-bind("windowSizeWhenDesignForRef") *
|
|
35 / v-bind("windowSizeWhenDesignForRef") *
|
|
v-bind("windowSizeInCssForRef")
|
|
v-bind("windowSizeInCssForRef")
|
|
);
|
|
);
|
|
|
|
+ @media screen and (min-width: 768px) {
|
|
|
|
+ width: 40%;
|
|
|
|
+ }
|
|
|
|
|
|
> img {
|
|
> img {
|
|
width: calc(
|
|
width: calc(
|