|
@@ -166,12 +166,10 @@ import { USER_SIGNOUT, USER_SIGNIN } from "../../store/user";
|
|
|
import { QUESTION_API } from "@/constants/constants";
|
|
|
import HomeSide from "./HomeSide.vue";
|
|
|
import LinkTitles from "./LinkTitles.vue";
|
|
|
-import timeMixin from "../../../../mixins/timeMixin";
|
|
|
|
|
|
export default {
|
|
|
name: "Home",
|
|
|
components: { HomeSide, LinkTitles },
|
|
|
- mixins: [timeMixin],
|
|
|
data() {
|
|
|
var validatePass = (rule, value, callback) => {
|
|
|
if (value === "") {
|
|
@@ -247,29 +245,13 @@ export default {
|
|
|
if (this.user.passwordWeak) {
|
|
|
this.passWeakDialog = true;
|
|
|
}
|
|
|
- this.onlineSignal();
|
|
|
},
|
|
|
beforeDestroy() {
|
|
|
this.clearSetTs();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions([USER_SIGNOUT, USER_SIGNIN]),
|
|
|
- async onlineSignal() {
|
|
|
- this.clearSetTs();
|
|
|
|
|
|
- let result = true;
|
|
|
- await this.$httpWithoutBar
|
|
|
- .post(QUESTION_API + "/user/online/signal")
|
|
|
- .catch((error) => {
|
|
|
- result = false;
|
|
|
- console.log("tag", error);
|
|
|
- });
|
|
|
- if (!result) return;
|
|
|
-
|
|
|
- this.addSetTime(() => {
|
|
|
- this.onlineSignal();
|
|
|
- }, 5000);
|
|
|
- },
|
|
|
openMessageHome() {
|
|
|
this.$router.push({ path: "/home/site-message" });
|
|
|
},
|