|
@@ -49,10 +49,15 @@ export default {
|
|
|
this.lastSnapTime = Date.now();
|
|
|
this.snapTimer();
|
|
|
} else {
|
|
|
- this.serverLog(
|
|
|
- "debug/S-002001",
|
|
|
- "上次的抓拍未超过1分钟,本次抓拍指令取消"
|
|
|
- );
|
|
|
+ // this.serverLog(
|
|
|
+ // "debug/S-002001",
|
|
|
+ // "上次的抓拍未超过1分钟,本次抓拍指令取消"
|
|
|
+ // );
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ "摄像头框",
|
|
|
+ "上次的抓拍未超过1分钟,本次抓拍指令取消",
|
|
|
+ ]);
|
|
|
this.decreaseSnapCount();
|
|
|
}
|
|
|
this.toggleSnapNow();
|
|
@@ -153,8 +158,8 @@ export default {
|
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
|
const captureBlob = await this.getSnapShot();
|
|
|
this.videoStartPlay();
|
|
|
- // console.log(captureBlob.size);
|
|
|
- this.serverLog("debug/S-004001", "抓拍照片的大小:" + captureBlob.size);
|
|
|
+ console.log("抓拍照片的大小:" + captureBlob.size);
|
|
|
+ // this.serverLog("debug/S-004001", "抓拍照片的大小:" + captureBlob.size);
|
|
|
const [captureFilePath, signIdentifier] = await this.uploadToServer(
|
|
|
captureBlob
|
|
|
);
|
|
@@ -292,7 +297,7 @@ export default {
|
|
|
"/api/ecs_oe_student/examControl/getCapturePhotoUpYunSign?" + params
|
|
|
);
|
|
|
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
|
|
|
// let myHeaders = new Headers();
|
|
|
// for (let [k, v] of Object.entries(res.data.headers)) {
|
|
@@ -307,18 +312,20 @@ export default {
|
|
|
}
|
|
|
myFormData.append("file", captureBlob);
|
|
|
|
|
|
- const response = await fetch(res.data.formUrl, {
|
|
|
+ await fetch(res.data.formUrl, {
|
|
|
method: "POST",
|
|
|
body: myFormData,
|
|
|
});
|
|
|
|
|
|
- console.log(response);
|
|
|
+ // console.log(response);
|
|
|
resultUrl = res.data.accessUrl;
|
|
|
signIdentifier = res.data.signIdentifier;
|
|
|
- this.serverLog("debug/S-005001", "抓拍照片保存成功:");
|
|
|
+ // this.serverLog("debug/S-005001", "抓拍照片保存成功:");
|
|
|
+ window._hmt.push(["_trackEvent", "摄像头框", "抓拍照片保存成功"]);
|
|
|
} catch (e) {
|
|
|
console.log(e);
|
|
|
- this.serverLog("debug/S-006001", "抓拍照片保存失败");
|
|
|
+ // this.serverLog("debug/S-006001", "抓拍照片保存失败");
|
|
|
+ window._hmt.push(["_trackEvent", "摄像头框", "抓拍照片保存失败"]);
|
|
|
this.$Message.error({
|
|
|
content: "保存抓拍照片到服务器失败!",
|
|
|
duration: 15,
|
|
@@ -382,6 +389,11 @@ export default {
|
|
|
}
|
|
|
resolve();
|
|
|
} catch (error) {
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ "摄像头框",
|
|
|
+ "虚拟摄像头-读取摄像头列表失败",
|
|
|
+ ]);
|
|
|
reject("读取摄像头列表失败");
|
|
|
}
|
|
|
});
|