|
@ -4,67 +4,74 @@ |
|
|
<img class="top-icon" :src="topIcon" alt="顶部图标" /> |
|
|
<img class="top-icon" :src="topIcon" alt="顶部图标" /> |
|
|
|
|
|
|
|
|
<!-- 中间图示及说明 --> |
|
|
<!-- 中间图示及说明 --> |
|
|
<div class="content-container"> |
|
|
|
|
|
<!-- 副标题 - 只在屏幕宽度小于等于1024px时显示 --> |
|
|
|
|
|
<img v-if="screenWidth <= 1024" class="sub-title" :src="subtitle" alt="四维作战体系" /> |
|
|
|
|
|
<!-- 内容图 - 根据屏幕宽度动态切换 --> |
|
|
|
|
|
<img class="content-icon" :src="currentContentIcon" alt="四维情绪" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 按钮区域 --> |
|
|
|
|
|
<div class="buttons-container"> |
|
|
|
|
|
<button class="btn-item" @click="goToAiEmotion"> |
|
|
|
|
|
<img :src="btnIcon" alt="开启财运" /> |
|
|
|
|
|
</button> |
|
|
|
|
|
|
|
|
<div class="bottom-icon"> |
|
|
|
|
|
<div class="content-container"> |
|
|
|
|
|
<!-- 副标题 - 只在屏幕宽度小于等于1024px时显示 --> |
|
|
|
|
|
<img |
|
|
|
|
|
v-if="screenWidth <= 1024" |
|
|
|
|
|
class="sub-title" |
|
|
|
|
|
:src="subtitle" |
|
|
|
|
|
alt="四维作战体系" |
|
|
|
|
|
/> |
|
|
|
|
|
<!-- 内容图 - 根据屏幕宽度动态切换 --> |
|
|
|
|
|
<img class="content-icon" :src="currentContentIcon" alt="四维情绪" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 按钮区域 --> |
|
|
|
|
|
<div class="buttons-container"> |
|
|
|
|
|
<button class="btn-item" @click="goToAiEmotion"> |
|
|
|
|
|
<img :src="btnIcon" alt="开启财运" /> |
|
|
|
|
|
</button> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup> |
|
|
<script setup> |
|
|
import { onMounted, ref, computed, onUnmounted } from 'vue' |
|
|
|
|
|
import { useRouter } from 'vue-router' |
|
|
|
|
|
|
|
|
import { onMounted, ref, computed, onUnmounted } from "vue"; |
|
|
|
|
|
import { useRouter } from "vue-router"; |
|
|
// 移除背景图片的导入,改用CSS设置 |
|
|
// 移除背景图片的导入,改用CSS设置 |
|
|
import topIcon from '@/assets/img/Emotionsmodel/大标题.png' |
|
|
|
|
|
import subtitle from '@/assets/img/Emotionsmodel/-s-标题 拷贝.png' |
|
|
|
|
|
import conteniconLarge from '@/assets/img/Emotionsmodel/_s_四维 拷贝.png' |
|
|
|
|
|
import conteniconSmall from '@/assets/img/Emotionsmodel/-s-四维.png' |
|
|
|
|
|
import btnIcon from '@/assets/img/Emotionsmodel/-s-开启财运.png' |
|
|
|
|
|
import { setHeight } from '@/utils/setHeight' |
|
|
|
|
|
|
|
|
import topIcon from "@/assets/img/Emotionsmodel/大标题.png"; |
|
|
|
|
|
import subtitle from "@/assets/img/Emotionsmodel/-s-标题 拷贝.png"; |
|
|
|
|
|
import conteniconLarge from "@/assets/img/Emotionsmodel/_s_四维 拷贝.png"; |
|
|
|
|
|
import conteniconSmall from "@/assets/img/Emotionsmodel/-s-四维.png"; |
|
|
|
|
|
import btnIcon from "@/assets/img/Emotionsmodel/-s-开启财运.png"; |
|
|
|
|
|
import { setHeight } from "@/utils/setHeight"; |
|
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
|
|
const pageRef = ref(null) |
|
|
|
|
|
const screenWidth = ref(window.innerWidth) |
|
|
|
|
|
|
|
|
const router = useRouter(); |
|
|
|
|
|
const pageRef = ref(null); |
|
|
|
|
|
const screenWidth = ref(window.innerWidth); |
|
|
|
|
|
|
|
|
// 根据屏幕宽度选择内容图片 |
|
|
// 根据屏幕宽度选择内容图片 |
|
|
const currentContentIcon = computed(() => { |
|
|
const currentContentIcon = computed(() => { |
|
|
return screenWidth.value > 1024 ? conteniconLarge : conteniconSmall |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
return screenWidth.value > 1024 ? conteniconLarge : conteniconSmall; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
const handleResize = () => { |
|
|
const handleResize = () => { |
|
|
screenWidth.value = window.innerWidth |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
screenWidth.value = window.innerWidth; |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
setHeight(pageRef.value) |
|
|
|
|
|
window.addEventListener('resize', handleResize) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
setHeight(pageRef.value); |
|
|
|
|
|
window.addEventListener("resize", handleResize); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
onUnmounted(() => { |
|
|
onUnmounted(() => { |
|
|
window.removeEventListener('resize', handleResize) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
window.removeEventListener("resize", handleResize); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
const goToAiEmotion = () => { |
|
|
const goToAiEmotion = () => { |
|
|
// 设置 sessionStorage 控制 homepage.vue 激活 AiEmotion tab |
|
|
// 设置 sessionStorage 控制 homepage.vue 激活 AiEmotion tab |
|
|
sessionStorage.setItem("activeTabAI", "AiEmotion") |
|
|
|
|
|
sessionStorage.setItem("activeIndexAI", "2") |
|
|
|
|
|
router.push("/homePage") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sessionStorage.setItem("activeTabAI", "AiEmotion"); |
|
|
|
|
|
sessionStorage.setItem("activeIndexAI", "2"); |
|
|
|
|
|
router.push("/homePage"); |
|
|
|
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped> |
|
|
<style scoped> |
|
|
.homepage { |
|
|
.homepage { |
|
|
min-height: 100vh; |
|
|
min-height: 100vh; |
|
|
background-image: url('@/assets/img/DBQBmodel/电脑背景.png'); |
|
|
|
|
|
|
|
|
background-image: url("@/assets/img/DBQBmodel/电脑背景.png"); |
|
|
background-size: cover; |
|
|
background-size: cover; |
|
|
background-position: center; |
|
|
background-position: center; |
|
|
background-repeat: no-repeat; |
|
|
background-repeat: no-repeat; |
|
@ -79,6 +86,16 @@ const goToAiEmotion = () => { |
|
|
width: 20vw; |
|
|
width: 20vw; |
|
|
min-width: 300px; |
|
|
min-width: 300px; |
|
|
height: auto; |
|
|
height: auto; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 10vh; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.bottom-icon { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
bottom: 0vh; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 四维体系整体容器修复 */ |
|
|
/* 四维体系整体容器修复 */ |
|
@ -87,6 +104,8 @@ const goToAiEmotion = () => { |
|
|
flex-direction: column; |
|
|
flex-direction: column; |
|
|
justify-content: center; |
|
|
justify-content: center; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
|
|
|
width: 80%; |
|
|
|
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 副标题 */ |
|
|
/* 副标题 */ |
|
@ -129,11 +148,18 @@ const goToAiEmotion = () => { |
|
|
height: auto; |
|
|
height: auto; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 1024px) { |
|
|
|
|
|
/* 四维体系整体容器修复 */ |
|
|
|
|
|
.content-container { |
|
|
|
|
|
width: 60%; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
/* 手机适配 */ |
|
|
/* 手机适配 */ |
|
|
@media (max-width: 768px) { |
|
|
@media (max-width: 768px) { |
|
|
.homepage { |
|
|
.homepage { |
|
|
min-height: 100vh; |
|
|
min-height: 100vh; |
|
|
background-image: url('@/assets/img/DBQBmodel/手机背景.png'); |
|
|
|
|
|
|
|
|
background-image: url("@/assets/img/DBQBmodel/手机背景.png"); |
|
|
background-size: cover; |
|
|
background-size: cover; |
|
|
background-position: center; |
|
|
background-position: center; |
|
|
background-repeat: no-repeat; |
|
|
background-repeat: no-repeat; |
|
@ -153,6 +179,11 @@ const goToAiEmotion = () => { |
|
|
margin-top: -2vh; |
|
|
margin-top: -2vh; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 四维体系整体容器修复 */ |
|
|
|
|
|
.content-container { |
|
|
|
|
|
width: 80%; |
|
|
|
|
|
height: auto; |
|
|
|
|
|
} |
|
|
.content-icon { |
|
|
.content-icon { |
|
|
width: 87%; |
|
|
width: 87%; |
|
|
} |
|
|
} |
|
|