| | |
| | | <i class="fas fa-cog"></i> 人è¸è¯å«æä»¶é
ç½® |
| | | </button> |
| | | </div> |
| | | <el-button |
| | | <!-- <el-button |
| | | type="primary" |
| | | size="small" |
| | | style="width: 100%; margin-top: 1rem" |
| | | class="reBtn" |
| | | @click="registerdialogVisible = true" |
| | | >äººè¸æ³¨å</el-button |
| | | > |
| | | > --> |
| | | <!-- <div style="width: 100%; margin-top: 1rem; display: flex"> |
| | | <el-button |
| | | v-if="show" |
| | |
| | | clearTimeout(interval.value); |
| | | imgbase64.value = xmlResquest.response; |
| | | if (flag == 2) { |
| | | const faceContainer = document.getElementById("face-recognition"); |
| | | const faceIcon = faceContainer.querySelector(".face-icon"); |
| | | const capturedFace = document.getElementById("captured-face"); |
| | | capturedFace.src = "data:image/png;base64," + xmlResquest.response; |
| | | faceIcon.style.display = "none"; |
| | | capturedFace.style.display = "block"; |
| | | // const faceContainer = document.getElementById("face-recognition"); |
| | | // const faceIcon = faceContainer.querySelector(".face-icon"); |
| | | // const capturedFace = document.getElementById("captured-face"); |
| | | // capturedFace.src = "data:image/png;base64," + xmlResquest.response; |
| | | // faceIcon.style.display = "none"; |
| | | // capturedFace.style.display = "block"; |
| | | window.URL.revokeObjectURL(url); |
| | | faceRecognitionEvent(); |
| | | return; |
| | |
| | | if (callBack) callBack(false, "请æ±åé失败"); |
| | | } |
| | | }; |
| | | |
| | | const faceRecognitionEvent = () => { |
| | | let url = baseUrl + "/api/UserFace/FaceRecognition"; |
| | | let xmlResquest = new XMLHttpRequest(); |
| | |
| | | let response = JSON.parse(xmlResquest.response); |
| | | if (response.status) { |
| | | token.value = response.data.token; |
| | | // document.getElementById("home-content").style.display = "flex"; |
| | | // document.getElementById("login-content").style.display = "none"; |
| | | // document.getElementById("face-content").style.display = "none"; |
| | | } else { |
| | | ElMessage.error("è¯å«å¤±è´¥"); |
| | | // faceRecognition.innerHTML = |
| | | // '<div class="face-error"><i class="fas fa-times-circle"></i><p>è¯å«å¤±è´¥</p></div>'; |
| | | } |
| | | // faceRecognition.innerHTML = '<i class="fas fa-user face-icon"></i>'; |
| | | } else { |
| | | ElMessage.error("æ°æ®æäº¤å¤±è´¥"); |
| | | } |