|
|
@ -1,14 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div id="home-screen-wrapper"> |
|
|
|
<div id="home-screen-wrapper"> |
|
|
|
<van-overlay |
|
|
|
|
|
|
|
:show="showOverlay" |
|
|
|
|
|
|
|
z-index="100" |
|
|
|
|
|
|
|
style="background-color: #000" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<van-loading size="80px" vertical color="#1989fa" |
|
|
|
|
|
|
|
><span>加载中...</span></van-loading |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
</van-overlay> |
|
|
|
|
|
|
|
<div class="bg-video" @click="changeAnimation()"> |
|
|
|
<div class="bg-video" @click="changeAnimation()"> |
|
|
|
<!-- 关机动画循环 --> |
|
|
|
<!-- 关机动画循环 --> |
|
|
|
<video |
|
|
|
<video |
|
|
@ -122,13 +113,12 @@ import { |
|
|
|
onActivated, |
|
|
|
onActivated, |
|
|
|
getCurrentInstance, |
|
|
|
getCurrentInstance, |
|
|
|
onBeforeMount, |
|
|
|
onBeforeMount, |
|
|
|
|
|
|
|
nextTick |
|
|
|
} from "vue"; |
|
|
|
} from "vue"; |
|
|
|
import router from "@/router"; |
|
|
|
import router from "@/router"; |
|
|
|
import { CountTo } from "vue3-count-to"; |
|
|
|
import { CountTo } from "vue3-count-to"; |
|
|
|
import { $commonService } from "@/services/framework/dependency-injection-service"; |
|
|
|
import { $commonService } from "@/services/framework/dependency-injection-service"; |
|
|
|
|
|
|
|
|
|
|
|
/** 是否显示遮罩层 */ |
|
|
|
|
|
|
|
const showOverlay = ref(true); |
|
|
|
|
|
|
|
/** 小时 */ |
|
|
|
/** 小时 */ |
|
|
|
const hour = ref("--"); |
|
|
|
const hour = ref("--"); |
|
|
|
/** 分钟 */ |
|
|
|
/** 分钟 */ |
|
|
@ -168,12 +158,15 @@ const timePushTimer: any = ref(null); |
|
|
|
const { proxy } = getCurrentInstance() as any; |
|
|
|
const { proxy } = getCurrentInstance() as any; |
|
|
|
const tem = ref(22); |
|
|
|
const tem = ref(22); |
|
|
|
const hum = ref(50); |
|
|
|
const hum = ref(50); |
|
|
|
const startTem = ref(22); |
|
|
|
const startTem = ref(99); |
|
|
|
const startHum = ref(50); |
|
|
|
const startHum = ref(0); |
|
|
|
const seasonName = ref("雪天"); |
|
|
|
const seasonName = ref("雪天"); |
|
|
|
const seasonImg = ref("/assets/imgs/show/home_xuetian.png"); |
|
|
|
const seasonImg = ref("/assets/imgs/show/home_xuetian.png"); |
|
|
|
const seasonTem = ref(-10); |
|
|
|
const seasonTem = ref(-10); |
|
|
|
const getImgSrc = $commonService.$imgService.getImgSrc; |
|
|
|
const getImgSrc = $commonService.$imgService.getImgSrc; |
|
|
|
|
|
|
|
/** 向父组件传递事件 */ |
|
|
|
|
|
|
|
const emit = defineEmits(["videoReady"]); |
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(() => { |
|
|
|
onBeforeMount(() => { |
|
|
|
proxy.$eventBusService.on("queryType", setType); |
|
|
|
proxy.$eventBusService.on("queryType", setType); |
|
|
|
//温度、湿度数据 |
|
|
|
//温度、湿度数据 |
|
|
@ -235,9 +228,14 @@ onActivated(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
onMounted(() => { |
|
|
|
setTimeout(() => { |
|
|
|
if (animationApproach.value) { |
|
|
|
showOverlay.value = false; |
|
|
|
const videoLoad = setInterval(() => { |
|
|
|
}, 3500); |
|
|
|
if ( animationApproach.value.readyState >= 3 ) { |
|
|
|
|
|
|
|
emit("videoReady"); |
|
|
|
|
|
|
|
clearInterval(videoLoad); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, 500) |
|
|
|
|
|
|
|
} |
|
|
|
getTimeTimer.value = setInterval(() => { |
|
|
|
getTimeTimer.value = setInterval(() => { |
|
|
|
const date = new Date(); |
|
|
|
const date = new Date(); |
|
|
|
hour.value = |
|
|
|
hour.value = |
|
|
@ -257,9 +255,6 @@ onUnmounted(() => { |
|
|
|
* |
|
|
|
* |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
const wholeSetting = () => { |
|
|
|
const wholeSetting = () => { |
|
|
|
//初始动画值 |
|
|
|
|
|
|
|
startTem.value = tem.value; |
|
|
|
|
|
|
|
startHum.value = hum.value; |
|
|
|
|
|
|
|
router.push({ |
|
|
|
router.push({ |
|
|
|
path: "/wholeSetting", |
|
|
|
path: "/wholeSetting", |
|
|
|
query: { |
|
|
|
query: { |
|
|
|