-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
155 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,31 @@ | ||
import type * as T from './type' | ||
import http from '@/utils/http' | ||
|
||
const BASE_URL = '/system/client' | ||
export type * from './type' | ||
|
||
export interface ClientResp { | ||
id: string | ||
clientId: string | ||
clientKey: string | ||
clientSecret: string | ||
authType: string | ||
clientType: string | ||
activeTimeout: string | ||
timeout: string | ||
status: string | ||
createUser: string | ||
createTime: string | ||
updateUser: string | ||
updateTime: string | ||
createUserString: string | ||
updateUserString: string | ||
} | ||
export interface ClientDetailResp { | ||
id: string | ||
clientId: string | ||
clientKey: string | ||
clientSecret: string | ||
authType: string | ||
clientType: string | ||
activeTimeout: string | ||
timeout: string | ||
status: string | ||
createUser: string | ||
createTime: string | ||
updateUser: string | ||
updateTime: string | ||
createUserString: string | ||
updateUserString: string | ||
} | ||
export interface ClientQuery { | ||
clientKey: string | ||
clientSecret: string | ||
authType: string[] | ||
clientType: string | ||
status: string | ||
sort: Array<string> | ||
} | ||
export interface ClientPageQuery extends ClientQuery, PageQuery {} | ||
const BASE_URL = '/system/client' | ||
|
||
/** @desc 查询系统授权列表 */ | ||
export function listClient(query: ClientPageQuery) { | ||
return http.get<PageRes<ClientResp[]>>(`${BASE_URL}`, query) | ||
/** @desc 查询客户端列表 */ | ||
export function listClient(query: T.ClientPageQuery) { | ||
return http.get<PageRes<T.ClientResp[]>>(`${BASE_URL}`, query) | ||
} | ||
|
||
/** @desc 查询系统授权详情 */ | ||
/** @desc 查询客户端详情 */ | ||
export function getClient(id: string) { | ||
return http.get<ClientDetailResp>(`${BASE_URL}/${id}`) | ||
return http.get<T.ClientDetailResp>(`${BASE_URL}/${id}`) | ||
} | ||
|
||
/** @desc 新增系统授权 */ | ||
/** @desc 新增客户端 */ | ||
export function addClient(data: any) { | ||
return http.post(`${BASE_URL}`, data) | ||
} | ||
|
||
/** @desc 修改系统授权 */ | ||
/** @desc 修改客户端 */ | ||
export function updateClient(data: any, id: string) { | ||
return http.put(`${BASE_URL}/${id}`, data) | ||
} | ||
|
||
/** @desc 删除系统授权 */ | ||
export function deleteClient(id: string) { | ||
return http.del(`${BASE_URL}/${id}`) | ||
} | ||
|
||
/** @desc 导出系统授权 */ | ||
export function exportClient(query: ClientQuery) { | ||
return http.download(`${BASE_URL}/export`, query) | ||
/** @desc 删除客户端 */ | ||
export function deleteClient(ids: string | Array<string>) { | ||
return http.del(`${BASE_URL}/${ids}`) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.