From a0a1c206612de9a3e9d64f3d45564c0ff03f93f6 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期四, 02 一月 2025 15:22:13 +0800
Subject: [PATCH] 环境
---
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