|
|
@@ -55,23 +55,25 @@ var timer = null as any
|
|
|
watch(hoverIndex, (newVal: any) => {
|
|
|
const infoBoxPcDom = document.getElementById('infoBoxPc')
|
|
|
console.log('余数', newVal % 7)
|
|
|
- clearTimeout(timer)
|
|
|
- timer = setTimeout(() => {
|
|
|
- if (newVal % 7 <= 4 && newVal % 7 > 0) {
|
|
|
- infoBoxPcDom!.style.right = 'auto'
|
|
|
- infoBoxPcDom!.style.left = hoverDomRightX.value + 'px'
|
|
|
- } else {
|
|
|
- infoBoxPcDom!.style.left = 'auto'
|
|
|
- infoBoxPcDom!.style.right = window.innerWidth - hoverDomLeftX.value + 'px'
|
|
|
- }
|
|
|
- if (newVal <= 7) {
|
|
|
- infoBoxPcDom!.style.bottom = window.innerHeight - hoverDomBottomY.value - hoverDomBottomY.value / 4 + 'px'
|
|
|
+ if (infoBoxPcDom) {
|
|
|
+ clearTimeout(timer)
|
|
|
+ timer = setTimeout(() => {
|
|
|
+ if (newVal % 7 <= 4 && newVal % 7 > 0) {
|
|
|
+ infoBoxPcDom.style.right = 'auto'
|
|
|
+ infoBoxPcDom.style.left = hoverDomRightX.value + 'px'
|
|
|
+ } else {
|
|
|
+ infoBoxPcDom.style.left = 'auto'
|
|
|
+ infoBoxPcDom.style.right = window.innerWidth - hoverDomLeftX.value + 'px'
|
|
|
+ }
|
|
|
+ if (newVal <= 7) {
|
|
|
+ infoBoxPcDom!.style.bottom = window.innerHeight - hoverDomBottomY.value - hoverDomBottomY.value / 4 + 'px'
|
|
|
|
|
|
- } else {
|
|
|
- infoBoxPcDom!.style.bottom = window.innerHeight - hoverDomBottomY.value - 40 + 'px'
|
|
|
- }
|
|
|
- isShowInfoBox.value = true
|
|
|
- }, 100)
|
|
|
+ } else {
|
|
|
+ infoBoxPcDom!.style.bottom = window.innerHeight - hoverDomBottomY.value - 40 + 'px'
|
|
|
+ }
|
|
|
+ isShowInfoBox.value = true
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
|
|
|
}, { immediate: true })
|
|
|
|
|
|
@@ -85,9 +87,10 @@ watch(hoverIndex, (newVal: any) => {
|
|
|
// immediate: true
|
|
|
// })
|
|
|
|
|
|
-
|
|
|
+// @ts-ignore
|
|
|
let swiper2 = null as any
|
|
|
const swiper2Index = ref(0)
|
|
|
+// @ts-ignore
|
|
|
let swiper = null as any
|
|
|
onMounted(() => {
|
|
|
swiper = new Swiper(".mySwiper", {
|
|
|
@@ -121,22 +124,21 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
curUnit.value = store.dataAll.welfareList[0]
|
|
|
- console.log(curUnit.value)
|
|
|
})
|
|
|
|
|
|
-const swiper2Prev = () => {
|
|
|
- swiper2.slidePrev()
|
|
|
-}
|
|
|
-const swiper2Next = () => {
|
|
|
- swiper2.slideNext()
|
|
|
-}
|
|
|
+// const swiper2Prev = () => {
|
|
|
+// swiper2.slidePrev()
|
|
|
+// }
|
|
|
+// const swiper2Next = () => {
|
|
|
+// swiper2.slideNext()
|
|
|
+// }
|
|
|
|
|
|
-const swiperPrev = () => {
|
|
|
- swiper.slidePrev()
|
|
|
-}
|
|
|
-const swiperNext = () => {
|
|
|
- swiper.slideNext()
|
|
|
-}
|
|
|
+// const swiperPrev = () => {
|
|
|
+// swiper.slidePrev()
|
|
|
+// }
|
|
|
+// const swiperNext = () => {
|
|
|
+// swiper.slideNext()
|
|
|
+// }
|
|
|
|
|
|
|
|
|
|
|
|
@@ -148,18 +150,16 @@ const swiperNext = () => {
|
|
|
<div class='scene-list-box'>
|
|
|
<!-- 信息展示 -->
|
|
|
<div id="infoBoxPc" class="info-box" v-show="isShowInfoBox && !browser.mobile" @mousemove="isShowInfoBox = true">
|
|
|
- <!-- <div id="infoBoxPc" class="info-box" v-show="true"> -->
|
|
|
<img class="close-icon" @click="isShowInfoBox = false" src="@/assets/images/close-icon.png" alt="">
|
|
|
<div class="info-box-top"></div>
|
|
|
<div class="info-box-bottom">
|
|
|
<div class="bottom-left">
|
|
|
- <h1>{{ hoverIndex }}</h1>
|
|
|
- <h4>{{ curUnit.title ? curUnit.title : '' }}</h4>
|
|
|
- <div class="left-disc">{{ curUnit.disc ? curUnit.disc : '' }}</div>
|
|
|
+ <h4>{{ curUnit ? curUnit.title : '' }}</h4>
|
|
|
+ <div class="left-disc">{{ curUnit ? curUnit.disc : '' }}</div>
|
|
|
<!-- <h4>{{ store.dataAll.welfareList[0].title ? store.dataAll.welfareList[0].title : '' }}</h4>
|
|
|
<p>{{ store.dataAll.welfareList[0].disc ? store.dataAll.welfareList[0].disc : '' }}</p> -->
|
|
|
</div>
|
|
|
- <div class="bottom-right">
|
|
|
+ <!-- <div class="bottom-right">
|
|
|
<div class="swiper mySwiper">
|
|
|
<div class="swiper-wrapper">
|
|
|
<div class="swiper-slide" v-for="(item, index) in curUnit.images" :key="index"><img
|
|
|
@@ -169,13 +169,13 @@ const swiperNext = () => {
|
|
|
<div class="swiper-button-next" @click="swiperNext"></div>
|
|
|
<div class="swiper-pagination"></div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 信息展示移动端 -->
|
|
|
<div class="info-box-mo" v-show="isShowInfoBox && browser.mobile">
|
|
|
<!-- Swiper -->
|
|
|
- <div class="swiper mySwiper2">
|
|
|
+ <!-- <div class="swiper mySwiper2">
|
|
|
<div class="swiper-wrapper">
|
|
|
<div class="swiper-slide" v-for="(item, index) in curUnit.images" :key="index"><img
|
|
|
:src="`${baseUrl}/welfareImage/${curUnit.id + 1}/${item}`" alt=""></div>
|
|
|
@@ -188,10 +188,10 @@ const swiperNext = () => {
|
|
|
@click="swiper2.slideTo(index)" :class="{ 'active': swiper2Index == index }">
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="content-info">
|
|
|
- <h4>{{ curUnit.title }}</h4>
|
|
|
- <div>{{ curUnit.disc }}</div>
|
|
|
+ <h4>{{ curUnit ? curUnit.title : '' }}</h4>
|
|
|
+ <div>{{ curUnit ? curUnit.disc : '' }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="content" v-if="!browser.mobile">
|
|
|
@@ -284,7 +284,7 @@ const swiperNext = () => {
|
|
|
justify-content: space-around;
|
|
|
|
|
|
.bottom-left {
|
|
|
- width: 35%;
|
|
|
+ width: 90%;
|
|
|
|
|
|
.left-disc {
|
|
|
font-size: 14px;
|
|
|
@@ -539,7 +539,7 @@ const swiperNext = () => {
|
|
|
position: relative;
|
|
|
overflow: inherit;
|
|
|
|
|
|
- .icon-down{
|
|
|
+ .icon-down {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
transform: translateY(-100%);
|