|  |  |  | 
|---|
|  |  |  | import { storageLocal } from './storage'; | 
|---|
|  |  |  | import { storageLocal } from '@12333/utils'; | 
|---|
|  |  |  | import { useUserStoreWithOut } from '@/stores/modules/user'; | 
|---|
|  |  |  | import { MatchMakingIdentityEnum } from '@12333/constants'; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const StorageKey = { | 
|---|
|  |  |  | USER_INFO_KEY: 'USER__INFO__', | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function getUserInfo() { | 
|---|
|  |  |  | return storageLocal.getItem<API.IdentityModelTokenCacheItem>(StorageKey.USER_INFO_KEY); | 
|---|
|  |  |  | return storageLocal.getItem<API.LoginCommandCallback>(StorageKey.USER_INFO_KEY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function setUserInfo(userInfo: API.IdentityModelTokenCacheItem) { | 
|---|
|  |  |  | export function setUserInfo(userInfo: API.LoginCommandCallback) { | 
|---|
|  |  |  | return storageLocal.setItem(StorageKey.USER_INFO_KEY, userInfo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function getUserDetail() { | 
|---|
|  |  |  | return storageLocal.getItem<API.UserInfoV2>(StorageKey.USER_DETAIL_KEY); | 
|---|
|  |  |  | return storageLocal.getItem<API.GetEnterpriseLoginInfoQueryResult>(StorageKey.USER_DETAIL_KEY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function setUserDetail(userDetail: API.UserInfoV2) { | 
|---|
|  |  |  | export function setUserDetail(userDetail: API.GetEnterpriseLoginInfoQueryResult) { | 
|---|
|  |  |  | return storageLocal.setItem(StorageKey.USER_DETAIL_KEY, userDetail); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function removeUserDetail() { | 
|---|
|  |  |  | return storageLocal.removeItem(StorageKey.USER_DETAIL_KEY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function getMatchMakingIdentity() { | 
|---|
|  |  |  | return storageLocal.getItem<MatchMakingIdentityEnum>(StorageKey.MatchMakingIdentity_KEY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function setMatchMakingIdentity(matchMakingIdentity: MatchMakingIdentityEnum) { | 
|---|
|  |  |  | return storageLocal.setItem(StorageKey.MatchMakingIdentity_KEY, matchMakingIdentity); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | export function removeMatchMakingIdentity() { | 
|---|
|  |  |  | return storageLocal.removeItem(StorageKey.MatchMakingIdentity_KEY); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | type StorageLocation = { | 
|---|