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.
31 lines
673 B
31 lines
673 B
import {Config,http} from "./http"; |
|
export interface loginRequest { |
|
//用户名 |
|
username: string |
|
password: string |
|
firstName: string |
|
} |
|
|
|
export interface loginResponse { |
|
//密钥 |
|
token: string |
|
} |
|
|
|
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, |
|
method:'POST' |
|
}) |
|
} |
|
}
|
|
|