From b5c4d5b884a996002197987c07f90a6c8d7720f2 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 10 十二月 2024 10:45:29 +0800
Subject: [PATCH] ll

---
 h5/pages/polling/task.vue |   33 +++++++++++++++++++++++++++++----
 1 files changed, 29 insertions(+), 4 deletions(-)

diff --git a/h5/pages/polling/task.vue b/h5/pages/polling/task.vue
index 8298402..6ba466e 100644
--- a/h5/pages/polling/task.vue
+++ b/h5/pages/polling/task.vue
@@ -55,7 +55,10 @@
 		</scroll-view>
 
 		<!--  -->
-		
+		<!--  -->
+		<view class="reader-box" @click="stopScan" v-if="isScaning">
+			<view class="reader" id="reader"></view>
+		</view>
 	</view>
 </template>
 
@@ -87,7 +90,7 @@
 				},
 				html5Qrcode: null,
 				isScaning: false,
-				activeItem: {}
+				// activeItem: {}
 			};
 		},
 		onLoad() {
@@ -95,7 +98,6 @@
 		},
 		methods: {
 			openSc(item) {
-				this.activeItem = item
 				this.isScaning = true;
 				Html5Qrcode.getCameras().then((devices) => {
 					if (devices && devices.length) {
@@ -115,7 +117,11 @@
 										pointCode: decodeText
 									}).then(ress=> {
 										if(ress.data){
-											
+											uni.navigateTo({
+												url: '/pages/polling/point?id=' + ress.data.id
+											})
+										}else{
+											this.showToast('鏈尮閰嶅埌宸℃鐐�,璇烽噸鏂版壂鎻�')
 										}
 									})
 								}
@@ -349,4 +355,23 @@
 			}
 		}
 	}
+
+	.reader-box {
+		position: fixed;
+		top: 0;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+	}
+	
+	.reader {
+		width: 100%;
+		// width: 540rpx;
+		// height: 540rpx;
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translate(-50%, -50%);
+	}
 </style>
\ No newline at end of file

--
Gitblit v1.9.3