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