Browse Source

日志记录学生端电脑时间与服务器时间的差异

Michael Wang 5 years ago
parent
commit
e72bb9e835
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/store.js

+ 3 - 0
src/store.js

@@ -1,6 +1,7 @@
 import Vue from "vue";
 import Vue from "vue";
 import Vuex from "vuex";
 import Vuex from "vuex";
 import { EPCC_DOMAIN, CUG_DOMAIN } from "@/constants/constants";
 import { EPCC_DOMAIN, CUG_DOMAIN } from "@/constants/constants";
+import { createLog } from "@/utils/logger";
 
 
 Vue.use(Vuex);
 Vue.use(Vuex);
 
 
@@ -219,6 +220,8 @@ export default new Vuex.Store({
     },
     },
     updateTimeDifference(state, payload) {
     updateTimeDifference(state, payload) {
       state = Object.assign(state, { timeDifference: payload });
       state = Object.assign(state, { timeDifference: payload });
+      createLog({ action: "updateTimeDifference", timeDifference: payload });
+      console.log("与服务器时间差异:" + payload);
     },
     },
     updateSiteMessages(state, payload) {
     updateSiteMessages(state, payload) {
       state = Object.assign(state, { siteMessages: payload });
       state = Object.assign(state, { siteMessages: payload });