From ef2eeb98929c5fa7ba3bc0e5962db89ade377f70 Mon Sep 17 00:00:00 2001 From: guoweilong Date: Wed, 27 Sep 2023 14:23:00 +0800 Subject: [PATCH] fix: logo图更换高清 响应式按钮大小过渡调整 产品信息隐藏生产人和生成时间字段 扫码增加声音和震动 切换tab调整 正则表达式更换,ios低版本不支持零宽度正向断言 --- pages/component/InformationModule.vue | 9 +++++++-- pages/component/InspectionModule.vue | 2 +- pages/component/QrScan.vue | 21 ++++++++++++++++++--- pages/component/goback.vue | 16 ++++++++++++++-- pages/component/topWindow.vue | 14 +++++++------- pages/homePage/index.vue | 6 +++--- pages/product/index.vue | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------ pages/product/repairReport.vue | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------ pages/product/scan.vue | 26 ++++++++++++++++++++++---- static/hdk-top-logo.png | Bin 1323 -> 0 bytes static/logo.png | Bin 1873 -> 0 bytes 11 files changed, 217 insertions(+), 58 deletions(-) diff --git a/pages/component/InformationModule.vue b/pages/component/InformationModule.vue index 8b2bf4d..c466881 100644 --- a/pages/component/InformationModule.vue +++ b/pages/component/InformationModule.vue @@ -21,14 +21,15 @@ {{$t('hdk.Model')}} {{informationData.type || ""}} - + + @@ -102,7 +103,9 @@ } .swiperCss { + margin-top: 20px; width: 95%; + height: 200px !important; } .flex-between { @@ -147,6 +150,8 @@ .swiperCss { width: 80%; + margin-top: 20px; + height: 600px !important; } .flex-between { diff --git a/pages/component/InspectionModule.vue b/pages/component/InspectionModule.vue index 24294ac..4266e34 100644 --- a/pages/component/InspectionModule.vue +++ b/pages/component/InspectionModule.vue @@ -17,7 +17,7 @@ {{$t('hdk.TestDate')}} - {{$u.timeFormat(inspectionData.checkTime, 'yyyy年mm月dd日') || ''}} + {{$u.timeFormat(inspectionData.checkTime, 'yyyy-mm-dd') || ''}} diff --git a/pages/component/QrScan.vue b/pages/component/QrScan.vue index 671c1be..b77e176 100644 --- a/pages/component/QrScan.vue +++ b/pages/component/QrScan.vue @@ -9,8 +9,11 @@ import { Html5Qrcode } from 'html5-qrcode'; + const innerAudioContext = uni.createInnerAudioContext(); + innerAudioContext.autoplay = true; + innerAudioContext.src = '/static/audio/scanSound.mp3'; export default { - created() { + mounted() { this.getCameras(); navigator.mediaDevices.getUserMedia({ video: true @@ -43,6 +46,7 @@ }); }, start() { + let that = this; //environment后置 user前置 this.html5QrCode .start({ @@ -57,13 +61,24 @@ halfSample: true, //缩小二维码提高识别精度吧 }, (decodedText) => { - this.$emit('ok', decodedText); + this.playAudio(); + navigator.vibrate(500); + setTimeout(()=>{ + that.$emit('ok', decodedText); + this.stop(); + },500) }, ) .catch((err) => { this.$emit('err', err); }); }, + playAudio() { + innerAudioContext.play(); + innerAudioContext.onPlay(() => { + console.log('音频开始播放'); + }); + }, stop() { this.html5QrCode .stop() @@ -88,7 +103,7 @@ height: 100%; width: 100%; // background: rgba($color: #000000, $alpha: 0.48); - background:rgba(0, 0, 0, 1.48); + background: rgba(0, 0, 0, 1.48); } diff --git a/pages/component/goback.vue b/pages/component/goback.vue index 8a8f49d..4058752 100644 --- a/pages/component/goback.vue +++ b/pages/component/goback.vue @@ -1,6 +1,6 @@ @@ -34,6 +34,18 @@