feat: 优化登录页面相关功能,新增用户注册和忘记密码功能模块

This commit is contained in:
liuzhi
2025-03-12 12:02:49 +08:00
committed by Charles7c
parent 4bd083eb91
commit 933cd6063a
2 changed files with 37 additions and 0 deletions

View File

@@ -1,3 +1,11 @@
/*
* @Author: liuzhi 1306086303@qq.com
* @Date: 2025-03-12 11:00:21
* @LastEditors: liuzhi 1306086303@qq.com
* @LastEditTime: 2025-03-12 11:56:52
* @FilePath: \continew-admin-ui\src\apis\auth\index.ts
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import type * as T from './type'
import http from '@/utils/http'
@@ -44,3 +52,8 @@ export const getUserInfo = () => {
export const getUserRoute = () => {
return http.get<T.RouteItem[]>(`${BASE_URL}/user/route`)
}
/** @desc 获取手机区号 */
export const getPhoneCountryCode = () => {
return http.get(`https://restcountries.com/v3.1/all`)
}

View File

@@ -57,6 +57,17 @@ export interface AuthReq {
authType?: AuthType
}
/** 账号注册请求参数 */
export interface AccountSignupReq extends AuthReq {
username: string
nickname: string
password: string
gender: number
deptId: number
roleIds: string[]
status: number
}
/** 账号登录请求参数 */
export interface AccountLoginReq extends AuthReq {
username: string
@@ -65,6 +76,19 @@ export interface AccountLoginReq extends AuthReq {
uuid: string
}
/** 手机号注册请求参数 */
export interface PhoneSignupReq extends AuthReq {
phone: string
captcha: string
username: string
nickname: string
password: string
gender: number
deptId: number
roleIds: string[]
status: number
}
/** 手机号登录请求参数 */
export interface PhoneLoginReq extends AuthReq {
phone: string