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