|
@@ -1,6 +1,7 @@
|
|
|
import * as api from '@/api/index'
|
|
|
-// import {ztptGetUserInfo, ztptGetUserRoleList} from "@/api/modules/ztpt";
|
|
|
import {getUserInfoByUsername} from "@/api/modules/account";
|
|
|
+import {getSignTime} from "@/api/modules/sign";
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
|
|
|
const state = {
|
|
|
apiProxy: {
|
|
@@ -52,9 +53,15 @@ const actions = {
|
|
|
})
|
|
|
},
|
|
|
LOAD_TIMESTAMP({ commit }: any) {
|
|
|
- const date = new Date('2023-07-14')
|
|
|
- commit('SET_TIMESTAMP', date)
|
|
|
+ getSignTime().then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ commit('SET_TIMESTAMP', new Date(res.data))
|
|
|
+ } else {
|
|
|
+ ElMessage.error(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
+
|
|
|
}
|
|
|
|
|
|
export default {
|