项目创建
This commit is contained in:
Vendored
+133
@@ -0,0 +1,133 @@
|
||||
/**
|
||||
* namespace: Api
|
||||
*
|
||||
* 所有接口相关类型定义
|
||||
*/
|
||||
declare namespace Api {
|
||||
/** 基础类型 */
|
||||
namespace Http {
|
||||
/** 基础响应 */
|
||||
interface BaseResponse<T = any> {
|
||||
// 状态码
|
||||
code: number
|
||||
// 消息
|
||||
msg: string
|
||||
// 数据
|
||||
data: T
|
||||
}
|
||||
}
|
||||
|
||||
/** 通用类型 */
|
||||
namespace Common {
|
||||
/** 分页参数 */
|
||||
interface PaginatingParams {
|
||||
/** 当前页码 */
|
||||
current: number
|
||||
/** 每页条数 */
|
||||
size: number
|
||||
}
|
||||
|
||||
/** 启用状态 */
|
||||
type EnableStatus = '1' | '2'
|
||||
}
|
||||
|
||||
/** 认证类型 */
|
||||
namespace Auth {
|
||||
/** 登录参数 */
|
||||
interface LoginParams {
|
||||
userName: string
|
||||
password: string
|
||||
}
|
||||
|
||||
/** 登录响应 */
|
||||
interface LoginResponse {
|
||||
token: string
|
||||
refreshToken: string
|
||||
}
|
||||
}
|
||||
|
||||
/** 用户类型 */
|
||||
namespace User {
|
||||
/** 用户信息 */
|
||||
interface UserInfo {
|
||||
userId: number
|
||||
userName: string
|
||||
roles: string[]
|
||||
buttons: string[]
|
||||
avatar?: string
|
||||
email?: string
|
||||
phone?: string
|
||||
}
|
||||
|
||||
/** 用户列表数据 */
|
||||
interface UserListData {
|
||||
records: UserInfo[]
|
||||
current: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
}
|
||||
/** 品牌类型 */
|
||||
namespace Brand {
|
||||
/** 品牌信息 */
|
||||
interface BrandInfo {
|
||||
data: never[]
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
|
||||
/** 品牌列表数据 */
|
||||
interface BrandListData {
|
||||
records: UserInfo[]
|
||||
current: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
}
|
||||
/** 工单 */
|
||||
namespace Work {
|
||||
interface WorkInfo {
|
||||
attachments: never[]
|
||||
id: number
|
||||
code: string
|
||||
categorie_id: string
|
||||
status: number
|
||||
content: number
|
||||
}
|
||||
|
||||
/** 品牌列表数据 */
|
||||
interface WorkListData {
|
||||
data: WorkInfo[]
|
||||
current: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
/** 添加参数 */
|
||||
interface AddParams {
|
||||
categorie_id: any
|
||||
content: any
|
||||
attachment:any
|
||||
}
|
||||
interface AddResponse {
|
||||
code: string
|
||||
message: string
|
||||
}
|
||||
/** 修改状态参数 */
|
||||
interface StatusParams {
|
||||
id: any
|
||||
msg: any
|
||||
status:any
|
||||
}
|
||||
//分类
|
||||
interface CategorieInfo {
|
||||
id: number
|
||||
name: string
|
||||
}
|
||||
interface CategorieListData {
|
||||
data: CategorieInfo[]
|
||||
current: number
|
||||
size: number
|
||||
total: number
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user