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.

57 lines
1.3 KiB

2 years ago
// @ts-ignore
2 years ago
import {Config,http} from "./http";
2 years ago
export interface request {
2 years ago
}
2 years ago
export interface response {
2 years ago
//密钥
token: string
2 years ago
}
2 years ago
export class userService{
2 years ago
static async list(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/list', {
2 years ago
...param,
data: data,
method:'GET'
})
}
2 years ago
static async all(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/all', {
2 years ago
...param,
data: data,
2 years ago
method:'GET'
2 years ago
})
}
2 years ago
static async auto(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/auto', {
2 years ago
...param,
data: data,
method:'GET'
})
}
2 years ago
//有 "user:list"
static async loginWithList(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/login_list', {
2 years ago
...param,
data: data,
method:'GET'
})
}
2 years ago
// 没有 "user:list" 权限
static async login(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/login', {
2 years ago
...param,
data: data,
method:'GET'
})
}
1 year ago
static async login1(data :request, param?: Config<request>):Promise<response>{
return http<request, response>('/api/v1/user/login1', {
...param,
data: data,
method:'POST'
})
}
2 years ago
}