|
@@ -857,6 +857,7 @@ export default {
|
|
|
isTaking: true, //是否正在拍照
|
|
|
needPhoto: false, //是否需要拍照
|
|
|
examType: 0, // 3-模块,1-章,2-节
|
|
|
+ compareFaceData: 0, // 拍照匹配相似度
|
|
|
};
|
|
|
},
|
|
|
async onLoad(option) {
|
|
@@ -982,6 +983,9 @@ export default {
|
|
|
photo: self.ossAvatarUrl,
|
|
|
recordId: self.recordId,
|
|
|
};
|
|
|
+ if (this.ossAvatarUrl) {
|
|
|
+ data.similarity = this.compareFaceData // 相似度
|
|
|
+ }
|
|
|
console.log(data, "拍照提交");
|
|
|
this.$api.studyExamPhotoRecord(data).then((res) => {
|
|
|
console.log(res, "拍照提交结果");
|
|
@@ -1128,7 +1132,6 @@ export default {
|
|
|
encoding: "base64",
|
|
|
position: 0,
|
|
|
success: (res) => {
|
|
|
- console.log(res);
|
|
|
let base64 = "data:image/jpg;base64," + res.data;
|
|
|
|
|
|
this.$api
|
|
@@ -1138,7 +1141,6 @@ export default {
|
|
|
gradeId: this.gradeId,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
- console.log(res, "res");
|
|
|
resolve(res.data.data);
|
|
|
});
|
|
|
},
|
|
@@ -1150,6 +1152,7 @@ export default {
|
|
|
},
|
|
|
async submitPhoto() {
|
|
|
let compareFaceData = await this.faceRecognition();
|
|
|
+ this.compareFaceData = compareFaceData
|
|
|
console.log(compareFaceData, "compareFaceData");
|
|
|
if (compareFaceData == 0) {
|
|
|
uni.showToast({
|