import auth from '@/services/auth';
import { getRedirectUrl } from '@/utils/getRedirectUrl';

const useUser = () => {
	/**
	 * 密码登录
	 * @param loginForm
	 */
	const passwordLogin = async (loginForm: any): Promise<void> => {
		await auth.userAuth.passwordLogin(loginForm);
		await getRedirectUrl();
	};

	return {
		passwordLogin,
	};
};

export default useUser;
