Sfoglia il codice sorgente

修改token存储key

bill 1 anno fa
parent
commit
fd366fbdd9
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      src/api/setup.ts

+ 3 - 3
src/api/setup.ts

@@ -14,7 +14,7 @@ export type Hook = {
 export const axiosFactory = () => {
   const axiosRaw = Axios.create()
   const axiosConfig = {
-    token: localStorage.getItem('fuseToken'),
+    token: localStorage.getItem('fuseCodeToken'),
     unTokenSet: [] as string[],
     unReqErrorSet: [] as string[],
     unResErrorSet: [] as string[],
@@ -65,11 +65,11 @@ export const axiosFactory = () => {
 
   const getToken = () => axiosConfig.token
   const setToken = (token: string) => {
-    localStorage.setItem('fuseToken', token)
+    localStorage.setItem('fuseCodeToken', token)
     axiosConfig.token = token
   }
   const delToken = () => {
-    localStorage.removeItem('fuseToken')
+    localStorage.removeItem('fuseCodeToken')
     axiosConfig.token = null
   }