mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-14 10:11:53 +08:00
feat: add vue3(element-plus)
This commit is contained in:
27
yudao-ui-admin-vue3/src/api/system/oauth2/client.ts
Normal file
27
yudao-ui-admin-vue3/src/api/system/oauth2/client.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { OAuth2ClientVo } from './client.types'
|
||||
|
||||
// 查询 OAuth2列表
|
||||
export const getOAuth2ClientPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2ClientVo>>({ url: '/system/oauth2-client/page', params })
|
||||
}
|
||||
|
||||
// 查询 OAuth2详情
|
||||
export const getOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.get<OAuth2ClientVo>({ url: '/system/oauth2-client/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增 OAuth2
|
||||
export const createOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.post({ url: '/system/oauth2-client/create', params })
|
||||
}
|
||||
|
||||
// 修改 OAuth2
|
||||
export const updateOAuth2ClientApi = (params: OAuth2ClientVo) => {
|
||||
return defHttp.put({ url: '/system/oauth2-client/update', params })
|
||||
}
|
||||
|
||||
// 删除 OAuth2
|
||||
export const deleteOAuth2ClientApi = (id: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
}
|
20
yudao-ui-admin-vue3/src/api/system/oauth2/client.types.ts
Normal file
20
yudao-ui-admin-vue3/src/api/system/oauth2/client.types.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
export type OAuth2ClientVo = {
|
||||
id: number
|
||||
clientId: string
|
||||
secret: string
|
||||
name: string
|
||||
logo: string
|
||||
description: string
|
||||
status: number
|
||||
accessTokenValiditySeconds: number
|
||||
refreshTokenValiditySeconds: number
|
||||
redirectUris: string[]
|
||||
autoApprove: boolean
|
||||
authorizedGrantTypes: string[]
|
||||
scopes: string[]
|
||||
authorities: string[]
|
||||
resourceIds: string[]
|
||||
additionalInformation: string
|
||||
isAdditionalInformationJson: boolean
|
||||
createTime: string
|
||||
}
|
12
yudao-ui-admin-vue3/src/api/system/oauth2/token.ts
Normal file
12
yudao-ui-admin-vue3/src/api/system/oauth2/token.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { defHttp } from '@/config/axios'
|
||||
import { OAuth2TokenVo } from './token.types'
|
||||
|
||||
// 查询 token列表
|
||||
export const getAccessTokenPageApi = ({ params }) => {
|
||||
return defHttp.get<PageResult<OAuth2TokenVo>>({ url: '/system/oauth2-token/page', params })
|
||||
}
|
||||
|
||||
// 删除 token
|
||||
export const deleteAccessTokenApi = (accessToken: number) => {
|
||||
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
|
||||
}
|
10
yudao-ui-admin-vue3/src/api/system/oauth2/token.types.ts
Normal file
10
yudao-ui-admin-vue3/src/api/system/oauth2/token.types.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export type OAuth2TokenVo = {
|
||||
id: number
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
userType: number
|
||||
clientId: string
|
||||
createTime: string
|
||||
expiresTime: string
|
||||
}
|
Reference in New Issue
Block a user