|
@@ -69,10 +69,17 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { password, smscode } from "@/plugins/formRules";
|
|
import { password, smscode } from "@/plugins/formRules";
|
|
-import { login, getSmsCode, getSchoolInfo, getSysConfig } from "../api";
|
|
|
|
|
|
+import {
|
|
|
|
+ login,
|
|
|
|
+ getSmsCode,
|
|
|
|
+ getSchoolInfo,
|
|
|
|
+ getSysConfig,
|
|
|
|
+ getSysTime
|
|
|
|
+} from "../api";
|
|
import { Base64 } from "@/plugins/crypto";
|
|
import { Base64 } from "@/plugins/crypto";
|
|
import ResetPwd from "@/modules/base/components/ResetPwd";
|
|
import ResetPwd from "@/modules/base/components/ResetPwd";
|
|
import { ORG_CODE } from "@/constants/app";
|
|
import { ORG_CODE } from "@/constants/app";
|
|
|
|
+import { syncTime } from "@/plugins/syncServerTime";
|
|
|
|
|
|
const wstorage = {
|
|
const wstorage = {
|
|
set(key, value, expire = null) {
|
|
set(key, value, expire = null) {
|
|
@@ -138,8 +145,13 @@ export default {
|
|
this.setWaitingTime();
|
|
this.setWaitingTime();
|
|
this.getSchool();
|
|
this.getSchool();
|
|
this.getSmsCodeRequired();
|
|
this.getSmsCodeRequired();
|
|
|
|
+ this.syncServerTime();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async syncServerTime() {
|
|
|
|
+ const time = await getSysTime();
|
|
|
|
+ syncTime(time);
|
|
|
|
+ },
|
|
async getSmsCodeRequired() {
|
|
async getSmsCodeRequired() {
|
|
const data = await getSysConfig("sys.code.enable");
|
|
const data = await getSysConfig("sys.code.enable");
|
|
this.smsCodeRequired = data.configValue === "true";
|
|
this.smsCodeRequired = data.configValue === "true";
|