// src/api/login.ts  用户以及登录相关的接口
import request from '../utils/request.ts'
import type { ApiResponse } from '@/types/types' // 引入类型
// 登录接口
export const login = (data:any): Promise<ApiResponse> => {
  return request({
    url: '/api/v1/teach_login/sign_in',
    method: 'post',
    data
  })
}

// 获取用户信息
export const getUserInfo = ():Promise<ApiResponse> => {
  return request({
    url: '/api/v1/pc_personal/find_user_info',
    method: 'get'
  })
}
// 退出登录
export const loginOut = (): Promise<ApiResponse>  => {
  return request({
    url: `/api/v1/teach_login/sign_out`,
    method: 'post'
  })
}
// 修改密码
export const changePassWord = (data: any) => {
  return request({
    url: `/adminApi/v1/sys/users/updatePassword`,
    method: 'post',
    data
  })
}

