xiatian 3 سال پیش
والد
کامیت
06b3baec5e
2فایلهای تغییر یافته به همراه14 افزوده شده و 6 حذف شده
  1. 0 6
      public/index.html
  2. 14 0
      src/modules/portal/views/home/Home.vue

+ 0 - 6
public/index.html

@@ -8,12 +8,6 @@
     <title>题库</title>
     <script>
       var _hmt = _hmt || [];
-      (function() {
-        var hm = document.createElement("script");
-        hm.src = "https://hm.baidu.com/hm.js?634d486c554479265c7e4d00433eb1e8";
-        var s = document.getElementsByTagName("script")[0];
-        s.parentNode.insertBefore(hm, s);
-      })();
 
       if (navigator.appVersion.includes("Chrome/")) {
         try {

+ 14 - 0
src/modules/portal/views/home/Home.vue

@@ -244,9 +244,23 @@ export default {
     if (this.user.passwordWeak) {
       this.passWeakDialog = true;
     }
+    this.onlineSignal();
   },
   methods: {
     ...mapActions([USER_SIGNOUT, USER_SIGNIN]),
+    async onlineSignal() {
+      try {
+        this.$httpWithoutBar
+          .post(QUESTION_API + "/user/online/signal")
+          .then(() => {
+            setTimeout(() => {
+              this.onlineSignal();
+            }, 3000);
+          });
+      } catch (error) {
+        console.log("tag", error);
+      }
+    },
     openMessageHome() {
       this.$router.push({ path: "/home/site-message" });
     },