import {post} from "@/service/request.ts";

/**
 * 登录并返回 token
 * @param code
 * @param phone
 */
export async function auth(phone: string, code: string) {
	return post<{
		token: string;
		user_info: UserProfile
	}>({
		url: '/login',
		data: {code, phone}
	})
}

export function sendSmsCode(phone: string) {
	return post({
		url:'/smscode', data:{phone}
	})
}