chutingting 1 rok temu
rodzic
commit
e38689cf91
2 zmienionych plików z 24 dodań i 3 usunięć
  1. +10
    -0
      src/api/login.js
  2. +14
    -3
      src/pages/login/index.vue

+ 10
- 0
src/api/login.js Wyświetl plik

@@ -39,4 +39,14 @@ export function loginByCodeApi(data) {
method: 'POST', method: 'POST',
data data
}) })
}

/**
* @description: 获取视频
*/
export function getVideoApi(data) {
return request({
url: `https://formall.oss-accelerate.aliyuncs.com/zx_apk/H5_config.json`,
method: 'get'
})
} }

+ 14
- 3
src/pages/login/index.vue Wyświetl plik

@@ -24,8 +24,9 @@
<script setup> <script setup>
//#region 导入 //#region 导入
import { getCurrentInstance, ref,nextTick } from "vue"; import { getCurrentInstance, ref,nextTick } from "vue";
import { isPlainObject, onLoad, onUnload } 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";


const myVideo = ref(null); const myVideo = ref(null);


@@ -83,13 +84,23 @@ function fileReaderTest() {
// video.play(); // video.play();
// } // }


//#region 初始化
onLoad(() => {
function getVideoFn() {
// getVideoApi().then(res => {
// debugger
// })
nextTick(()=>{ nextTick(()=>{
const video = document.querySelector("video.uni-video-video"); const video = document.querySelector("video.uni-video-video");
video.muted = false video.muted = false
video.play() video.play()
}) })
}

onShow(() => {
getVideoFn()
})
//#region 初始化
onLoad(() => {
getVideoFn()
runGetAndroidId(); runGetAndroidId();
// fileReaderTest(); // fileReaderTest();
userInfoModulesPinia.clearStorage(); userInfoModulesPinia.clearStorage();


Ładowanie…
Anuluj
Zapisz