feat(用户中心): 重构用户个人中心页面并添加HTTP常量
重构用户个人中心页面,新增HTTP请求方法常量模块 - 创建constants/http.ts定义HTTP方法常量 - 在API模块中使用HTTP常量替代字符串 - 重写用户中心页面,增加编辑资料和账号安全功能 - 添加头像上传、密码修改、邮箱绑定等功能
This commit is contained in:
15
src/constants/http.ts
Normal file
15
src/constants/http.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* HTTP 请求方法常量
|
||||
*/
|
||||
export const HttpMethod = {
|
||||
GET: 'GET',
|
||||
POST: 'POST',
|
||||
PUT: 'PUT',
|
||||
DELETE: 'DELETE',
|
||||
PATCH: 'PATCH',
|
||||
HEAD: 'HEAD',
|
||||
OPTIONS: 'OPTIONS',
|
||||
} as const;
|
||||
|
||||
// 导出类型以供使用
|
||||
export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
|
||||
Reference in New Issue
Block a user