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 @@