|
@@ -57,21 +57,25 @@ onMounted(() => {
|
|
|
* 初始化
|
|
|
*/
|
|
|
const getInit = async () => {
|
|
|
+ console.log("触发人脸识别")
|
|
|
let deviceid = localStorage.getItem('deviceid') || '';
|
|
|
if (!deviceid) {
|
|
|
proxy?.$modal.msgError(`请重新登录绑定设备号后使用`);
|
|
|
return false;
|
|
|
}
|
|
|
faceWs((e: any) => {
|
|
|
+ console.log("faceWS",e)
|
|
|
if (e?.wksid) {
|
|
|
//获取设备信息
|
|
|
startDevice({ deviceid: deviceid });
|
|
|
+ console.log("获取设备信息")
|
|
|
}
|
|
|
if (e?.type == 'fe_device_init_result') {
|
|
|
//接收设备信息并发送请求
|
|
|
if (e?.device_info) {
|
|
|
deviceInfo.value = e.device_info;
|
|
|
getCheckFace();
|
|
|
+ console.log("返回设备信息,检查是否支持人脸识别")
|
|
|
} else {
|
|
|
proxy?.$modal.msgError(`设备信息缺失,请重新登录绑定设备号后使用`);
|
|
|
}
|
|
@@ -81,6 +85,7 @@ const getInit = async () => {
|
|
|
if (e?.code == 0) {
|
|
|
//查看人脸识别状态,如果不处于关闭就先关闭再重新启动(可能会APP退出然后工作站还在运行的可能性)
|
|
|
getFaceState(handcontroller_id);
|
|
|
+ console.log("查看人脸识别状态")
|
|
|
} else {
|
|
|
let msg = "";
|
|
|
if (e.code == 102402) {
|
|
@@ -95,7 +100,8 @@ const getInit = async () => {
|
|
|
}
|
|
|
} else {
|
|
|
msg = `人脸识别模块不可用,code:${e.code}`;
|
|
|
- } proxy?.$modal.msgWarning(msg);
|
|
|
+ }
|
|
|
+ proxy?.$modal.msgWarning(msg);
|
|
|
getCloseFace();
|
|
|
}
|
|
|
}
|