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