You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
686 B

2 years ago
// @ts-ignore
2 years ago
import {Config,http} from "./http";
2 years ago
export interface loginRequest {
2 years ago
//用户名
username: string
password: string
firstName: string
2 years ago
}
export interface loginResponse {
2 years ago
//密钥
token: string
2 years ago
}
2 years ago
export class userService{
//列表
static async list(data :loginRequest, param?: Config<loginRequest>):Promise<loginResponse>{
return http<loginRequest, loginResponse>('/api/v1/user/list', {
...param,
data: data,
method:'GET'
})
}
//等了
static async login(data :loginRequest, param?: Config<loginRequest>):Promise<loginResponse>{
return http<loginRequest, loginResponse>('/api/v1/user/login', {
...param,
data: data,
2 years ago
method:'GET'
2 years ago
})
}
}