import request from "@/utils/request";

/**
 * 获取教师端测试 token
 * @param phone 手机号
 * @param smsCode 短信验证码
 * @param type 0: 短信登录 1: 密码登录
 * @param password 密码
 */
export function getTestTeachTokenRequest(phone: string, smsCode = "5566", type: 0 | 1 = 0, password?: string) {
  return request<{
    accessToken: string;
    refreshToken: string;
    expires: number;
    refreshExpires: number;
  }>({
    url: "/teach/sms/login",
    method: "POST",
    data: {
      phone,
      smsCode,
      type,
      password,
    },
  });
}
