import { UserModel } from './../pages/user/model' ; import store from 'store' ; const USER_KEY = 'user_key' ; export type LoginUser = Partial < UserModel & { menus : string [ ] ; errorMsg : string ; } > ; export default { saveUser ( user ) { store . set ( USER_KEY , user ) ; } , getUser ( ) { return store . get ( USER_KEY ) || { } ; } , removeUser ( ) { store . remove ( USER_KEY ) ; } , } ;