| @@ -1,11 +1,11 @@ | |||||
| <template> | <template> | ||||
| <view class="page"> | <view class="page"> | ||||
| <!-- <image src="../../assets/img/homeImg.jpg" mode="scaleToFill" /> --> | |||||
| <!-- <image src="../../assets/img/homeImg.jpg" mode="scaleToFill" /> | |||||
| muted--> | |||||
| <video id="myVideo" | <video id="myVideo" | ||||
| ref="myVideo" | ref="myVideo" | ||||
| :src='videoUrl' | :src='videoUrl' | ||||
| autoplay | autoplay | ||||
| muted | |||||
| loop | loop | ||||
| :controls="false"> | :controls="false"> | ||||
| </video> | </video> | ||||
| @@ -23,7 +23,7 @@ | |||||
| <script setup> | <script setup> | ||||
| //#region 导入 | //#region 导入 | ||||
| import { getCurrentInstance, ref,nextTick, onMounted } from "vue"; | |||||
| import { getCurrentInstance, ref,nextTick } from "vue"; | |||||
| import { isPlainObject, onLoad, onUnload, onShow } from "@dcloudio/uni-app"; | import { isPlainObject, onLoad, onUnload, onShow } from "@dcloudio/uni-app"; | ||||
| import { userInfoModules } from "@/store/modules/userInfo"; | import { userInfoModules } from "@/store/modules/userInfo"; | ||||
| import { getVideoApi } from "@/api/login.js"; | import { getVideoApi } from "@/api/login.js"; | ||||
| @@ -85,9 +85,9 @@ function getVideoFn() { | |||||
| getVideoApi().then(res => { | getVideoApi().then(res => { | ||||
| videoUrl.value = res.data | videoUrl.value = res.data | ||||
| nextTick(()=>{ | nextTick(()=>{ | ||||
| const video = document.querySelector("video.uni-video-video"); | |||||
| video.muted = false | |||||
| video.play() | |||||
| // const video = document.querySelector("video.uni-video-video"); | |||||
| // video.muted = false | |||||
| // video.play() | |||||
| // proxy.$refs.myVideo.muted = false | // proxy.$refs.myVideo.muted = false | ||||
| // proxy.$refs.myVideo.play(); | // proxy.$refs.myVideo.play(); | ||||
| }) | }) | ||||
| @@ -99,11 +99,6 @@ onShow(() => { | |||||
| getVideoFn() | getVideoFn() | ||||
| }) | }) | ||||
| //#region 初始化 | //#region 初始化 | ||||
| // const myVideo = ref(null); | |||||
| onMounted(() => { | |||||
| // getVideoFn() | |||||
| }) | |||||
| onLoad(() => { | onLoad(() => { | ||||
| getVideoFn() | getVideoFn() | ||||
| runGetAndroidId(); | runGetAndroidId(); | ||||