|
@@ -4,7 +4,11 @@ import {
|
|
|
getStudentSpecialtyNameListApi,
|
|
|
loginApi,
|
|
|
} from "@/api/login";
|
|
|
-import { DOMAIN, VITE_GIT_REPO_VERSION } from "@/constants/constants";
|
|
|
+import {
|
|
|
+ DOMAIN,
|
|
|
+ FACE_API_MODEL_PATH,
|
|
|
+ VITE_GIT_REPO_VERSION,
|
|
|
+} from "@/constants/constants";
|
|
|
import { useTimers } from "@/setups/useTimers";
|
|
|
import { store } from "@/store/store";
|
|
|
import { createUserDetailLog } from "@/utils/logger";
|
|
@@ -27,6 +31,28 @@ logger({
|
|
|
act: "首次渲染",
|
|
|
});
|
|
|
|
|
|
+//#region cache faceapi json
|
|
|
+{
|
|
|
+ const begin = Date.now();
|
|
|
+ void Promise.all([
|
|
|
+ fetch(
|
|
|
+ FACE_API_MODEL_PATH + "tiny_face_detector_model-weights_manifest.json"
|
|
|
+ ),
|
|
|
+ fetch(FACE_API_MODEL_PATH + "face_landmark_68_model-weights_manifest.json"),
|
|
|
+ fetch(FACE_API_MODEL_PATH + "face_expression_model-weights_manifest.json"),
|
|
|
+ ]).then(() => {
|
|
|
+ logger({
|
|
|
+ cnl: ["console", "local", "server"],
|
|
|
+ pgn: "登录页面",
|
|
|
+ act: "faceapi json loaded",
|
|
|
+ ext: {
|
|
|
+ expense: Date.now() - begin,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+//#endregion
|
|
|
+
|
|
|
const { addTimeout } = useTimers();
|
|
|
|
|
|
let isGeeTestEnabled = $ref(false);
|