This commit is contained in:
duanxiaohai 2024-08-25 15:51:41 +08:00
parent a1cfbd1dc7
commit df116895a3
1 changed files with 18 additions and 14 deletions

View File

@ -834,9 +834,9 @@ const getData = (identNo) => {
} }
}); });
}); });
if (dataMyTag.camera) { // if (dataMyTag.camera) {
getCameraUrl(); // getCameraUrl();
} // }
} }
}); });
}; };
@ -854,27 +854,31 @@ const oneCardSolution = () => {
}; };
// //
const openCamera = () => { const openCamera = () => {
if (errorMessage.value) { // if (errorMessage.value) {
ElMessage.warning({ // ElMessage.warning({
message: errorMessage.value, // message: errorMessage.value,
}); // });
}else{ // }else{
camera.show = true; getCameraUrl();
}
// }
}; };
const errorMessage = ref(""); const errorMessage = ref("");
// //
const getCameraUrl = () => { const getCameraUrl = () => {
// camera.deviceCode = dataMyTag.camera.sbbm; camera.deviceCode = dataMyTag.camera.sbbm;
camera.deviceCode = "3KSCP274757F2JU"; // camera.deviceCode = "3KSCP274757F2JU";
http http
.get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${camera.deviceCode}`) .get(`/api/ggfwyth/ysyzt/getPlayAddress?deviceCode=${camera.deviceCode}`)
.then((res) => { .then((res) => {
if (res.code == 200) { if (res.code == 200) {
camera.show = true;
camera.hlsUriSsl = res.data.hlsUriSsl; camera.hlsUriSsl = res.data.hlsUriSsl;
} else { } else {
errorMessage.value = res.message; // errorMessage.value = res.message;
ElMessage.warning({
message: res.message,
});
} }
}); });
}; };