|
@@ -1,12 +1,23 @@
|
|
<template>
|
|
<template>
|
|
- <div class="fourth">
|
|
|
|
|
|
+ <div class="fourth" @click="click">
|
|
|
|
+ <video
|
|
|
|
+ loop
|
|
|
|
+ id="video"
|
|
|
|
+ x5-video-player-type="h5"
|
|
|
|
+ preload="metadata"
|
|
|
|
+ autoplay
|
|
|
|
+ playsinline="true"
|
|
|
|
+ webkit-playsinline="true"
|
|
|
|
+ x-webkit-airplay="true"
|
|
|
|
+ x5-video-orientation="portraint"
|
|
|
|
+ x5-video-player-fullscreen="true"
|
|
|
|
+ src="../../../assets/video/W.mp4"
|
|
|
|
+ class="video"
|
|
|
|
+ ></video>
|
|
<div class="main animate__animated">
|
|
<div class="main animate__animated">
|
|
<img src="../../../assets/img/top4.png" />
|
|
<img src="../../../assets/img/top4.png" />
|
|
- <label for="file">
|
|
|
|
- <img
|
|
|
|
- :class="{ camere: true, shakeSlow: dou === 2 }"
|
|
|
|
- src="../../../assets/img/camere.png"
|
|
|
|
- />
|
|
|
|
|
|
+ <label for="file" :class="{ camere: true, shakeSlow: dou === 2 }">
|
|
|
|
+ <img src="../../../assets/img/camere.png" style="width: 100%" />
|
|
</label>
|
|
</label>
|
|
<img
|
|
<img
|
|
:class="{ doudong: dou === 1 }"
|
|
:class="{ doudong: dou === 1 }"
|
|
@@ -25,7 +36,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
-import { ref, defineEmits } from "vue";
|
|
|
|
|
|
+import { ref, defineEmits, onMounted } from "vue";
|
|
// import { onMounted, reactive } from "vue";
|
|
// import { onMounted, reactive } from "vue";
|
|
// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
|
|
// import { isIpad, isIpod, isIphone } from "../../utils/isTerminal";
|
|
/**
|
|
/**
|
|
@@ -45,6 +56,29 @@ window.addEventListener(
|
|
);
|
|
);
|
|
|
|
|
|
const dou = ref(0);
|
|
const dou = ref(0);
|
|
|
|
+onMounted(() => {
|
|
|
|
+ const video = document.querySelector("video");
|
|
|
|
+ video.play();
|
|
|
|
+ document.addEventListener(
|
|
|
|
+ "WeixinJSBridgeReady",
|
|
|
|
+ function () {
|
|
|
|
+ video.play();
|
|
|
|
+ },
|
|
|
|
+ false
|
|
|
|
+ );
|
|
|
|
+ document.addEventListener(
|
|
|
|
+ "touchstart",
|
|
|
|
+ function () {
|
|
|
|
+ video.play();
|
|
|
|
+ },
|
|
|
|
+ false
|
|
|
|
+ );
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+function click() {
|
|
|
|
+ const video = document.querySelector("video");
|
|
|
|
+ video.play();
|
|
|
|
+}
|
|
|
|
|
|
function inputFile() {
|
|
function inputFile() {
|
|
dou.value = 1;
|
|
dou.value = 1;
|
|
@@ -62,8 +96,16 @@ function inputFile() {
|
|
.fourth {
|
|
.fourth {
|
|
background-image: url("../../../assets/img/bg4.png");
|
|
background-image: url("../../../assets/img/bg4.png");
|
|
background-size: 100% 100%;
|
|
background-size: 100% 100%;
|
|
- padding-top: 30%;
|
|
|
|
position: relative;
|
|
position: relative;
|
|
|
|
+ .video {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 0;
|
|
|
|
+ width: 400vw;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+ height: 100vh;
|
|
|
|
+ top: 0;
|
|
|
|
+ }
|
|
.main {
|
|
.main {
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 50%;
|
|
top: 50%;
|
|
@@ -74,6 +116,7 @@ function inputFile() {
|
|
display: block;
|
|
display: block;
|
|
}
|
|
}
|
|
.camere {
|
|
.camere {
|
|
|
|
+ display: block;
|
|
width: 5em;
|
|
width: 5em;
|
|
margin: 4em auto;
|
|
margin: 4em auto;
|
|
}
|
|
}
|