|
@@ -1,9 +1,22 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <video id="video" ref="video" :width="width" :height="height" autoplay>
|
|
|
+ <video
|
|
|
+ id="video"
|
|
|
+ ref="video"
|
|
|
+ :width="width"
|
|
|
+ :height="height"
|
|
|
+ autoplay
|
|
|
+ >
|
|
|
</video>
|
|
|
- <div v-if="showRecognizeButton" style="position: absolute; width: 400px; text-align: center; margin-top: -50px; color: #232323;">
|
|
|
- <button class="verify-button" @click="snap" :disabled="disableSnap">{{msg}}</button>
|
|
|
+ <div
|
|
|
+ v-if="showRecognizeButton"
|
|
|
+ style="position: absolute; width: 400px; text-align: center; margin-top: -50px; color: #232323;"
|
|
|
+ >
|
|
|
+ <button
|
|
|
+ class="verify-button"
|
|
|
+ @click="snap"
|
|
|
+ :disabled="disableSnap"
|
|
|
+ >{{msg}}</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -79,6 +92,7 @@ export default {
|
|
|
try {
|
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
|
const captureBlob = await this.getSnapShot();
|
|
|
+ // console.log(captureBlob.size);
|
|
|
const [fileName, captureFilePath] = await this.uploadToServer(
|
|
|
captureBlob
|
|
|
);
|
|
@@ -107,6 +121,15 @@ export default {
|
|
|
|
|
|
try {
|
|
|
this.disableSnap = true;
|
|
|
+ // console.log("disableSnap: " + this.disableSnap);
|
|
|
+ // await new Promise(resolve =>
|
|
|
+ // setTimeout(() => {
|
|
|
+ // console.log(new Date());
|
|
|
+ // resolve();
|
|
|
+ // }, 3000)
|
|
|
+ // );
|
|
|
+ // return;
|
|
|
+ // if(this.disableSnap) return; // 避免界面没有更新。
|
|
|
this.msg = "拍照中...";
|
|
|
const captureBlob = await this.getSnapShot();
|
|
|
this.msg = "上传照片中...";
|