diff --git a/src/api/system/social/client/index.ts b/src/api/system/social/client/index.ts new file mode 100644 index 00000000..bf13ab49 --- /dev/null +++ b/src/api/system/social/client/index.ts @@ -0,0 +1,37 @@ +import request from '@/config/axios' + +export interface SocialClientVO { + id: number + name: string + socialType: number + userType: number + clientId: string + clientSecret: string + agentId: string + status: number +} + +// 查询社交客户端列表 +export const getSocialClientPage = async (params) => { + return await request.get({ url: `/system/social-client/page`, params }) +} + +// 查询社交客户端详情 +export const getSocialClient = async (id: number) => { + return await request.get({ url: `/system/social-client/get?id=` + id }) +} + +// 新增社交客户端 +export const createSocialClient = async (data: SocialClientVO) => { + return await request.post({ url: `/system/social-client/create`, data }) +} + +// 修改社交客户端 +export const updateSocialClient = async (data: SocialClientVO) => { + return await request.put({ url: `/system/social-client/update`, data }) +} + +// 删除社交客户端 +export const deleteSocialClient = async (id: number) => { + return await request.delete({ url: `/system/social-client/delete?id=` + id }) +} diff --git a/src/api/system/social/user/index.ts b/src/api/system/social/user/index.ts new file mode 100644 index 00000000..f2850a62 --- /dev/null +++ b/src/api/system/social/user/index.ts @@ -0,0 +1,34 @@ +import request from '@/config/axios' + +export interface SocialUserVO { + id: number + type: number + openid: string + token: string + rawTokenInfo: string + nickname: string + avatar: string + rawUserInfo: string + code: string + state: string +} + +// 查询社交用户列表 +export const getSocialUserPage = async (params) => { + return await request.get({ url: `/system/social-user/page`, params }) +} + +// 查询社交用户详情 +export const getSocialUser = async (id: number) => { + return await request.get({ url: `/system/social-user/get?id=` + id }) +} + +// 修改社交用户 +export const updateSocialUser = async (data: SocialUserVO) => { + return await request.put({ url: `/system/social-user/update`, data }) +} + +// 删除社交用户 +export const deleteSocialUser = async (id: number) => { + return await request.delete({ url: `/system/social-user/delete?id=` + id }) +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 85e08e67..b2bf39b2 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -116,6 +116,7 @@ export enum DICT_TYPE { SYSTEM_OAUTH2_GRANT_TYPE = 'system_oauth2_grant_type', SYSTEM_MAIL_SEND_STATUS = 'system_mail_send_status', SYSTEM_NOTIFY_TEMPLATE_TYPE = 'system_notify_template_type', + SYSTEM_SOCIAL_CLIENT_TYPE = 'system_social_client_type', // ========== INFRA 模块 ========== INFRA_BOOLEAN_STRING = 'infra_boolean_string', diff --git a/src/views/Profile/Index.vue b/src/views/Profile/Index.vue index b05f93cc..8e1695b5 100644 --- a/src/views/Profile/Index.vue +++ b/src/views/Profile/Index.vue @@ -15,7 +15,7 @@