|
@@ -1,4 +1,4 @@
|
|
|
-import { getLocal, changSaveLocal } from "@/util/localUtil";
|
|
|
|
|
|
|
+import { getLocal, changSaveLocal, getCookieToken } from "@/util/localUtil";
|
|
|
import { ref, watchEffect } from "vue";
|
|
import { ref, watchEffect } from "vue";
|
|
|
import {
|
|
import {
|
|
|
PaggingReq,
|
|
PaggingReq,
|
|
@@ -49,7 +49,7 @@ export const getUsers = async (deptId?: string) =>
|
|
|
(await axios.get<UserInfo[]>(getUserListSelect, { params: { deptId } })).data;
|
|
(await axios.get<UserInfo[]>(getUserListSelect, { params: { deptId } })).data;
|
|
|
// 当前用户的信息
|
|
// 当前用户的信息
|
|
|
export const user = ref({
|
|
export const user = ref({
|
|
|
- token: getLocal("token", false) || "",
|
|
|
|
|
|
|
+ token: getLocal("token", false) || getCookieToken('token'),
|
|
|
info: getLocal("info", {} as UserInfo),
|
|
info: getLocal("info", {} as UserInfo),
|
|
|
});
|
|
});
|
|
|
export const setToken = (token: string) => {
|
|
export const setToken = (token: string) => {
|