mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-10-31 10:18:42 +08:00 
			
		
		
		
	refactor: store action name
This commit is contained in:
		| @@ -39,7 +39,7 @@ export const useUserStore = defineStore({ | ||||
|     } | ||||
|   }, | ||||
|   actions: { | ||||
|     async getUserInfoAction(userInfo: UserInfoVO) { | ||||
|     async setUserInfoAction(userInfo: UserInfoVO) { | ||||
|       if (!getAccessToken()) { | ||||
|         this.resetState() | ||||
|         return null | ||||
|   | ||||
| @@ -112,7 +112,7 @@ const handleLogin = async (params) => { | ||||
|   const res = await LoginApi.loginApi(loginData.loginForm) | ||||
|   setToken(res) | ||||
|   const userInfo = await LoginApi.getInfoApi() | ||||
|   await userStore.getUserInfoAction(userInfo) | ||||
|   await userStore.setUserInfoAction(userInfo) | ||||
|   await getRoutes() | ||||
|   loginLoading.value = false | ||||
| } | ||||
|   | ||||
| @@ -103,7 +103,7 @@ const signIn = async () => { | ||||
|     .then(async (res) => { | ||||
|       setToken(res?.token) | ||||
|       const userInfo = await getInfoApi() | ||||
|       await userStore.getUserInfoAction(userInfo) | ||||
|       await userStore.setUserInfoAction(userInfo) | ||||
|       getRoutes() | ||||
|     }) | ||||
|     .catch(() => {}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 xingyu
					xingyu