Michael Wang 4 gadi atpakaļ
vecāks
revīzija
15250eff65

+ 2 - 2
src/features/OnlineExam/CheckComputer.vue

@@ -817,7 +817,7 @@ export default {
   async mounted() {
     let start, end;
     // const networkStart = performance.now();
-    fetch("/oe/login", { Method: "HEAD" }).then((e) => {
+    fetch("/oe-web/login", { Method: "HEAD" }).then((e) => {
       start = moment(e.headers.get("date"));
       // const networkEnd = performance.now();
 
@@ -828,7 +828,7 @@ export default {
       //     : "与服务器时间差异超过60秒";
     });
     this.checkClockRateTimeout = setTimeout(() => {
-      fetch("/oe/login", { Method: "HEAD" }).then((e) => {
+      fetch("/oe-web/login", { Method: "HEAD" }).then((e) => {
         // 可能已经离开这个页面了
         if (!this.time) return;
 

+ 1 - 1
src/router.js

@@ -120,7 +120,7 @@ router.beforeEach((to, from, next) => {
   const loginPath = "/login/" + localStorage.getItem("domain");
 
   if (to.path) {
-    window._hmt.push(["_trackPageview", "/oe" + to.fullPath]);
+    window._hmt.push(["_trackPageview", "/oe-web" + to.fullPath]);
   }
 
   if (

+ 7 - 4
src/utils/loghub-tracking.js

@@ -1,6 +1,6 @@
 // from: http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/31752/cn_zh/1462870126706/loghub-tracking.js?spm=a2c4g.11186623.2.16.16a65ad1spF4TQ&file=loghub-tracking.js
 /* eslint-disable */
-(function(window, document) {
+(function (window, document) {
   function createHttpRequest() {
     if (window.ActiveXObject) {
       return new ActiveXObject("Microsoft.XMLHTTP");
@@ -21,14 +21,14 @@
     this.httpRequest_ = createHttpRequest();
   }
   AliLogTracker.prototype = {
-    push: function(key, value) {
+    push: function (key, value) {
       if (!key || !value) {
         return;
       }
       this.params_.push(key);
       this.params_.push(value);
     },
-    logger: async function() {
+    logger: async function () {
       var url = this.uri_;
       var k = 0;
       while (this.params_.length > 0) {
@@ -61,7 +61,10 @@
           );
           console.log("Failed log data:", url);
           // wzj-modified: 若上传失败,则重新上传本地日志
-          if (location.pathname.startsWith("/oe/login")) {
+          if (
+            location.pathname.startsWith("/oe-web/login") ||
+            location.pathname === "/oe-web"
+          ) {
             localStorage.setItem("lastLogIndex", 0);
           }
         }