Browse Source

video

dev
chutingting 1 year ago
parent
commit
460bb55994
3 changed files with 24 additions and 4 deletions
  1. +12
    -0
      src/api/home.js
  2. +10
    -2
      src/pages/login/index.vue
  3. +2
    -2
      src/utils/request.js

+ 12
- 0
src/api/home.js View File

@@ -74,3 +74,15 @@ export function deleteApi(data) {
data,
})
}

/**
* @description:获取视频地址
* @param
* @return:
*/
export function videoUrlApi(data) {
return request({
url: `/api/home/videoUrl`,
method: 'get'
})
}

+ 10
- 2
src/pages/login/index.vue View File

@@ -4,7 +4,7 @@
<!-- <image class="bgImg" src="../../assets/img/homeImg.jpg" /> -->
<video
class="bgImg"
src="https://video.metavatar.cc/sv/30f2d513-18c4739c509/30f2d513-18c4739c509.mp4"
:src="videoUrl"
autoplay
loop
:controls="false"
@@ -162,7 +162,7 @@
//#region 导入
import { ref, reactive, computed } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import { findImageApi, findGlodApi } from "../../api/home";
import { findImageApi, findGlodApi, videoUrlApi } from "../../api/home";
import {
loginApi,
loginPhoneApi,
@@ -182,6 +182,13 @@ const pageClass = computed(() => {
return "page";
}
});
// 获取视频
const videoUrl = ref('')
function getVideoUrl() {
videoUrlApi().then(res => {
videoUrl.value = res.data
})
}
//#region 勾选和手机号授权
const checkboxValue = ref([]);
const checkboxList = ref([
@@ -473,6 +480,7 @@ const handleOpenPrivacyContract = () => {
//#region 初始化
const urlUid = ref(""); //通过邀请来的会携带邀请人ID参数
onLoad((options) => {
getVideoUrl()
// 获取平台及系统信息
uni.getSystemInfo({
success: function (res) {


+ 2
- 2
src/utils/request.js View File

@@ -1,8 +1,8 @@
import { userInfoModules } from "@/store/modules/userInfo";
import { store } from '@/store/index';
// const BASE_URL = 'https://test.metavatar.cc/C/';
const BASE_URL = 'https://mtest.metavatar.cc/C/';
// const BASE_URL = 'https://mtest.metavatar.cc/C/';
const BASE_URL = 'https://neuver.metavatar.cc/C/';
const userInfoModulesPinia = userInfoModules(store);
// const BASE_URL = 'https://test.metavatar.cc/';


Loading…
Cancel
Save