Yazar | SHA1 | Mesaj | Tarih |
---|---|---|---|
|
dccff45b4b | edit video | 1 yıl önce |
|
ab4e367271 | edit video | 1 yıl önce |
|
8ca0642987 | edit | 1 yıl önce |
|
3acb35297e | edit | 1 yıl önce |
|
e38689cf91 | video | 1 yıl önce |
|
edf8e593aa | edit video | 1 yıl önce |
|
a62f230f9b | video | 1 yıl önce |
|
23891067b1 | 1 | 2 yıl önce |
@@ -1,4 +1,4 @@ | |||||
# Suimang-wxapp | |||||
# Suimang大屏 | |||||
# setStorageSync 键名 | # setStorageSync 键名 | ||||
@@ -39,4 +39,14 @@ export function loginByCodeApi(data) { | |||||
method: 'POST', | method: 'POST', | ||||
data | data | ||||
}) | }) | ||||
} | |||||
/** | |||||
* @description: 获取视频 | |||||
*/ | |||||
export function getVideoApi(data) { | |||||
return request({ | |||||
url: `/api/home/videoUrl`, | |||||
method: 'get' | |||||
}) | |||||
} | } |
@@ -10,10 +10,12 @@ | |||||
:activeStyle="{ color: '#ff4f00', fontsize: '30rpx' }" | :activeStyle="{ color: '#ff4f00', fontsize: '30rpx' }" | ||||
:inactiveStyle="{ color: '#fff', fontsize: '30rpx' }" | :inactiveStyle="{ color: '#fff', fontsize: '30rpx' }" | ||||
@click="chooseTab" | @click="chooseTab" | ||||
@change="changeTabCurrent" | |||||
:current="CurrentNum" | |||||
></u-tabs> | ></u-tabs> | ||||
<view class="moreTabs"> | <view class="moreTabs"> | ||||
<!-- <view class="moreIcon" @click="showPopup = true"> 更多 </view> --> | <!-- <view class="moreIcon" @click="showPopup = true"> 更多 </view> --> | ||||
<view class="moreIcon" @click="showPopup = true"> 更多 </view> | |||||
<view class="moreIcon" @click="showPopup = true"> 更多筛选 </view> | |||||
</view> | </view> | ||||
</view> | </view> | ||||
<!-- 更多tab弹出层 --> | <!-- 更多tab弹出层 --> | ||||
@@ -95,8 +97,8 @@ const sex = ref(2); | |||||
const sexList = ref([ | const sexList = ref([ | ||||
{ name: "女", id: 2 }, | { name: "女", id: 2 }, | ||||
{ name: "男", id: 1 }, | { name: "男", id: 1 }, | ||||
{ name: "单人", id: 3 }, | |||||
{ name: "多人", id: 4 }, | |||||
// { name: "单人", id: 3 }, | |||||
// { name: "多人", id: 4 }, | |||||
]); | ]); | ||||
const sexList2 = ref([ | const sexList2 = ref([ | ||||
{ name: "女", id: 2 }, | { name: "女", id: 2 }, | ||||
@@ -104,49 +106,63 @@ const sexList2 = ref([ | |||||
]); | ]); | ||||
// 类型 | // 类型 | ||||
const mouldType = ref(""); | |||||
const mouldType = ref(1); | |||||
const mouldTypeList = ref([ | const mouldTypeList = ref([ | ||||
{ name: "单人", id: 1 }, | { name: "单人", id: 1 }, | ||||
{ name: "多人", id: 2 }, | { name: "多人", id: 2 }, | ||||
]); | ]); | ||||
// 点击tab | // 点击tab | ||||
function chooseTab(item) { | function chooseTab(item) { | ||||
if (item.id < 3) { | |||||
sex.value = item.id; | |||||
mouldType.value = ""; | |||||
} else if (item.id == 3) { | |||||
mouldType.value = 1; | |||||
sex.value = ""; | |||||
} else if (item.id == 4) { | |||||
mouldType.value = 2; | |||||
sex.value = ""; | |||||
} | |||||
sex.value = item.id; | |||||
// if (item.id < 3) { | |||||
// sex.value = item.id; | |||||
// mouldType.value = ""; | |||||
// } else if (item.id == 3) { | |||||
// mouldType.value = 1; | |||||
// sex.value = ""; | |||||
// } else if (item.id == 4) { | |||||
// mouldType.value = 2; | |||||
// sex.value = ""; | |||||
// } | |||||
} | |||||
const CurrentNum = ref(0); | |||||
function changeTabCurrent(tabItem) { | |||||
console.log(tabItem.index); | |||||
CurrentNum.value = tabItem.index; | |||||
} | } | ||||
// 更多里的tab 性别 | // 更多里的tab 性别 | ||||
function chooseSex(item) { | function chooseSex(item) { | ||||
if (sex.value == item.id) { | |||||
if (mouldType.value == "") { | |||||
return; | |||||
} else { | |||||
sex.value = ""; | |||||
} | |||||
} else { | |||||
sex.value = item.id; | |||||
mouldType.value = ""; | |||||
if (item.id == 2) { | |||||
CurrentNum.value = 0; | |||||
} | |||||
if (item.id == 1) { | |||||
CurrentNum.value = 1; | |||||
} | } | ||||
sex.value = item.id; | |||||
// if (sex.value == item.id) { | |||||
// if (mouldType.value == "") { | |||||
// return; | |||||
// } else { | |||||
// sex.value = ""; | |||||
// } | |||||
// } else { | |||||
// sex.value = item.id; | |||||
// mouldType.value = ""; | |||||
// } | |||||
} | } | ||||
// 更多里的tab 类型 | // 更多里的tab 类型 | ||||
function chooseMouldType(item) { | function chooseMouldType(item) { | ||||
if (mouldType.value == item.id) { | |||||
if (sex.value == "") { | |||||
return; | |||||
} else { | |||||
mouldType.value = ""; | |||||
} | |||||
} else { | |||||
mouldType.value = item.id; | |||||
sex.value = ""; | |||||
} | |||||
mouldType.value = item.id; | |||||
// if (mouldType.value == item.id) { | |||||
// if (sex.value == "") { | |||||
// return; | |||||
// } else { | |||||
// mouldType.value = ""; | |||||
// } | |||||
// } else { | |||||
// mouldType.value = item.id; | |||||
// sex.value = ""; | |||||
// } | |||||
} | } | ||||
//#endregion | //#endregion | ||||
@@ -325,9 +341,9 @@ onUnload(() => { | |||||
background: linear-gradient(90deg, transparent 20%, #333 100%); | background: linear-gradient(90deg, transparent 20%, #333 100%); | ||||
// background-color: red; | // background-color: red; | ||||
.moreIcon { | .moreIcon { | ||||
margin-left: 50rpx; | |||||
margin-left: 30rpx; | |||||
margin-top: 15rpx; | margin-top: 15rpx; | ||||
width: 130rpx; | |||||
width: 150rpx; | |||||
height: 60rpx; | height: 60rpx; | ||||
border-radius: 40rpx; | border-radius: 40rpx; | ||||
background-color: #ff4f00; | background-color: #ff4f00; | ||||
@@ -1,6 +1,15 @@ | |||||
<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" | |||||
ref="myVideo" | |||||
:src='videoUrl' | |||||
autoplay | |||||
loop | |||||
:controls="false"> | |||||
</video> | |||||
<view class="bottomBox"> | <view class="bottomBox"> | ||||
<view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view> | <view class="orangeBtn" @click="toChooseStyle">拍摄数码写真</view> | ||||
<view class="IMEI" @click="Imei" | <view class="IMEI" @click="Imei" | ||||
@@ -14,11 +23,13 @@ | |||||
<script setup> | <script setup> | ||||
//#region 导入 | //#region 导入 | ||||
import { ref } from "vue"; | |||||
import { isPlainObject, onLoad, onUnload } from "@dcloudio/uni-app"; | |||||
import { getCurrentInstance, ref,nextTick } from "vue"; | |||||
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 userInfoModulesPinia = userInfoModules(); | const userInfoModulesPinia = userInfoModules(); | ||||
//#endregion ---------------------------------- | //#endregion ---------------------------------- | ||||
function toChooseStyle() { | function toChooseStyle() { | ||||
@@ -66,11 +77,35 @@ function fileReaderTest() { | |||||
} | } | ||||
} | } | ||||
const videoUrl = ref('') | |||||
const { proxy } = getCurrentInstance(); | |||||
function getVideoFn() { | |||||
getVideoApi().then(res => { | |||||
videoUrl.value = res.data | |||||
nextTick(()=>{ | |||||
// const video = document.querySelector("video.uni-video-video"); | |||||
// video.muted = false | |||||
// video.play() | |||||
// proxy.$refs.myVideo.muted = false | |||||
// proxy.$refs.myVideo.play(); | |||||
}) | |||||
}) | |||||
} | |||||
onShow(() => { | |||||
getVideoFn() | |||||
}) | |||||
//#region 初始化 | //#region 初始化 | ||||
onLoad(() => { | onLoad(() => { | ||||
getVideoFn() | |||||
runGetAndroidId(); | runGetAndroidId(); | ||||
// fileReaderTest(); | // fileReaderTest(); | ||||
userInfoModulesPinia.clearStorage(); | userInfoModulesPinia.clearStorage(); | ||||
}); | }); | ||||
//#endregion ---------------------------------- | //#endregion ---------------------------------- | ||||
@@ -137,6 +172,14 @@ function reFresh() { | |||||
position: relative; | position: relative; | ||||
width: 100vw; | width: 100vw; | ||||
height: 100vh; | height: 100vh; | ||||
// uni-video{ | |||||
// width:100%; | |||||
// height:100%; | |||||
// } | |||||
#myVideo{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
image { | image { | ||||
position: absolute; | position: absolute; | ||||
width: 100%; | width: 100%; | ||||