From 4a9faf7cacb6e9fb579b62947afeb1130ec7bb5f Mon Sep 17 00:00:00 2001 From: mengfanliang Date: Tue, 18 Feb 2025 16:54:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E8=84=B8=E8=AE=A4=E8=AF=81=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=B7=BB=E5=8A=A0=E6=89=AB=E6=8F=8F=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 5 + .../train_management/face_authentication.nvue | 10 +- pages/train_management/index.vue | 321 ++++++++++-------- 3 files changed, 186 insertions(+), 150 deletions(-) diff --git a/api/index.js b/api/index.js index ac03429..19f6f2b 100644 --- a/api/index.js +++ b/api/index.js @@ -77,4 +77,9 @@ export const getHistoricalApprovalRecords = (params) => post("/app/Task/getHis", * 获取班级管理分页列表 */ export const getClassList = (params) => post("/app/stagestudentrelation/pageTaskByUser", params); + +/** + * 获取是否上传人脸信息 + */ +export const getIsUploadFace = (params) => post("/app/user/getUserFace", params); // ********************* end *********************** diff --git a/pages/train_management/face_authentication.nvue b/pages/train_management/face_authentication.nvue index 41198fd..834ed19 100644 --- a/pages/train_management/face_authentication.nvue +++ b/pages/train_management/face_authentication.nvue @@ -60,12 +60,13 @@ export default { // scan_face 扫码 // learning_certification 学习认证 // meeting_attendance 会议签到 - const typeKey = ["scan_face", "learning_certification"]; + const typeKey = ["facial_input", "scan_face", "learning_certification"]; if (!typeKey.includes(query.type)) { uni.$u.toast("type参数错误"); return; } this.isFirst = query.isFirst || ""; + if (query.type === "facial_input") this.btnTextStr = "人脸认证"; if (query.type === "scan_face") this.btnTextStr = "签到"; if (query.type === "learning_certification") this.btnTextStr = "开始考试"; this.type = query.type; @@ -74,7 +75,7 @@ export default { }, onBackPress(event) { if (event.from === "backbutton") { - if ( + if (this.type === "facial_input" || (this.type === "scan_face" && this.isFirst === "1") || this.type === "learning_certification" ) { @@ -125,7 +126,10 @@ export default { speech.indexOf("base64,") + 7, ); try { - if (this.type === "scan_face") { + if (this.type === "facial_input") { + uni.$u.toast("人脸认证成功"); + uni.navigateBack({ delta: 1 }); + } else if (this.type === "scan_face") { // await setScanCodeToVerifyFace({ // USERAVATARPREFIX, // USERAVATARURL, diff --git a/pages/train_management/index.vue b/pages/train_management/index.vue index 2fdae96..c52c9b1 100644 --- a/pages/train_management/index.vue +++ b/pages/train_management/index.vue @@ -1,6 +1,6 @@ \ No newline at end of file +} +