修复登录报错提示内容错误,增加节假日同步功能

This commit is contained in:
qwq
2026-06-04 15:53:23 +08:00
parent 4a8f530921
commit cd63391f89
84 changed files with 874 additions and 31 deletions
+1
View File
@@ -0,0 +1 @@
import{m as n,h as r}from"./index-B5IUyHJe.js";const m=n("user",()=>{const o=r(JSON.parse(localStorage.getItem("user")||"null")),t=r(localStorage.getItem("token")||"");function s(e,l){t.value=e,o.value=l,localStorage.setItem("token",e),localStorage.setItem("user",JSON.stringify(l))}function a(){t.value="",o.value=null,localStorage.removeItem("token"),localStorage.removeItem("user")}return{user:o,token:t,setLogin:s,logout:a,isLoggedIn:()=>!!t.value,getRole:()=>{var e;return((e=o.value)==null?void 0:e.role)||""}}});export{m as u};