You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
701 B
JavaScript

import{s as c,r as n}from"./index-gTPnkE6J.js";const i=c("user",()=>{const t=n(localStorage.getItem("token")||""),o=n(localStorage.getItem("patientName")||""),a=n(localStorage.getItem("patientIdCardNo")||"");function r(e){t.value=e.access_token,o.value=e.patient_name,a.value=e.patient_id_card_no,localStorage.setItem("token",e.access_token),localStorage.setItem("patientName",e.patient_name),localStorage.setItem("patientIdCardNo",e.patient_id_card_no)}function l(){t.value="",o.value="",a.value="",localStorage.removeItem("token"),localStorage.removeItem("patientName"),localStorage.removeItem("patientIdCardNo")}return{token:t,patientName:o,patientIdCardNo:a,setLogin:r,logout:l}});export{i as u};