Bläddra i källkod

Merge branch '2025北京诚祥-家政版' of https://gogs.mtavip.com/wangguoyu/uniProject into 2025北京诚祥-家政版

tanxue 1 månad sedan
förälder
incheckning
772c8f73ac
1 ändrade filer med 15 tillägg och 11 borttagningar
  1. 15 11
      components/zhuapaiConfirm/index.vue

+ 15 - 11
components/zhuapaiConfirm/index.vue

@@ -1,6 +1,7 @@
 <template>
-		<view v-show="!showConfirmBtn" class="sxt-tip-box">{{textMess}}</view>
-		<camera v-show="showConfirmBtn" class="zp-camera" device-position="front" flash="off" @initdone="onVideoSuccess"></camera>
+	<view class="video-container">
+		<camera class="zp-camera" device-position="front" flash="off" @initdone="onVideoSuccess"></camera>
+	</view>
 </template>
 
 <script setup>
@@ -22,7 +23,6 @@
 	let zhuapaiFun = null;
 	let stopCamera = null;
 	let errorFunCompleteFn = null;
-	const textMess = ref('摄像头正在初始化...')
 
 	function startCamera() {
 		// 请求摄像头权限并获取流
@@ -35,23 +35,16 @@
 
 
 	function onVideoSuccess() {
-		showConfirmBtn.value = true;
 	}
 
 	function onVideoError(e) {
-		showConfirmBtn.false = true;
-		textMess.value = '摄像头初始化失败!'
 		emits('error')
 		errorFunCompleteFn && errorFunCompleteFn(e)
 	}
 
 	function showDialog() {
-		textMess.value = '摄像头正在初始化...'
 		setTimeout(() => {
-			showConfirmBtn.value = true;
-			nextTick(() => {
-				startCamera()
-			})
+			startCamera()
 		},1000)
 	}
 
@@ -74,3 +67,14 @@
 		stopCamera && stopCamera();
 	})
 </script>
+
+<style lang="scss">
+	.video-container {
+		position: relative;
+		overflow: hidden;
+		
+		.zp-camera {
+			
+		}
+	}
+</style>