Parcourir la source

准确统计chrome版本

Michael Wang il y a 5 ans
Parent
commit
cf2ed8a393
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4 4
      src/features/Login/Login.vue

+ 4 - 4
src/features/Login/Login.vue

@@ -793,17 +793,17 @@ export default {
       const shellVersion = window.navigator.userAgent
         .split(" ")
         .find(v => v.startsWith("electron-exam-shell/"));
+      const chromeVersion = window.navigator.userAgent
+        .split(" ")
+        .find(v => v.startsWith("Chrome/"));
       if (shellVersion) {
         window._hmt.push([
           "_trackEvent",
           "登录页面",
           "学生端版本",
-          shellVersion,
+          shellVersion + "/" + chromeVersion,
         ]);
       } else {
-        const chromeVersion = window.navigator.userAgent
-          .split(" ")
-          .find(v => v.startsWith("Chrome/"));
         if (chromeVersion) {
           window._hmt.push([
             "_trackEvent",