|
@@ -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) {
|