chutingting vor 1 Jahr
Ursprung
Commit
e38689cf91
2 geänderte Dateien mit 24 neuen und 3 gelöschten Zeilen
  1. +10
    -0
      src/api/login.js
  2. +14
    -3
      src/pages/login/index.vue

+ 10
- 0
src/api/login.js Datei anzeigen

@@ -39,4 +39,14 @@ export function loginByCodeApi(data) {
method: 'POST',
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 Datei anzeigen

@@ -24,8 +24,9 @@
<script setup>
//#region 导入
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 { getVideoApi } from "@/api/login.js";

const myVideo = ref(null);

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

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

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


Laden…
Abbrechen
Speichern