lsc 3 年之前
父节点
当前提交
24e92cda6e
共有 1 个文件被更改,包括 0 次插入18 次删除
  1. 0 18
      src/App.vue

+ 0 - 18
src/App.vue

@@ -92,9 +92,6 @@ export default {
     // this.$store.commit("update", ["isLogin", 123]);
     this.routerP();
     this.getnCount();
-    setInterval(() => {
-      this.getnCount();
-    }, 60000);
   },
   methods: {
     Login() {
@@ -159,21 +156,6 @@ export default {
     goTo(path) {
       this.$router.push(path);
     },
-    getnCount() {
-      this.ajax
-        .get(this.$store.state.api + "getClassC")
-        .then((res) => {
-          console.log(res);
-          if (res.data[0].length > 0) {
-            this.$store.commit("update", ["nCount", res.data[0][0].num]);
-          } else {
-            this.$store.commit("update", ["nCount", 0]);
-          }
-        })
-        .catch((err) => {
-          console.error(err);
-        });
-    },
   },
   watch: {
     $route(to, from) {