diff --git a/src/api/system/social/user/index.ts b/src/api/system/social/user/index.ts index f11231b7..9f1631df 100644 --- a/src/api/system/social/user/index.ts +++ b/src/api/system/social/user/index.ts @@ -14,7 +14,7 @@ export interface SocialUserVO { } // 查询社交用户列表 -export const getSocialUserPage = async (params) => { +export const getSocialUserPage = async (params: any) => { return await request.get({ url: `/system/social-user/page`, params }) } @@ -22,3 +22,8 @@ export const getSocialUserPage = async (params) => { export const getSocialUser = async (id: number) => { return await request.get({ url: `/system/social-user/get?id=` + id }) } + +// 获得绑定社交用户列表 +export const getBindSocialUserList = async () => { + return await request.get({ url: '/system/social-user/get-bind-list' }) +} diff --git a/src/api/system/user/profile.ts b/src/api/system/user/profile.ts index 2e279012..7ac8df1c 100644 --- a/src/api/system/user/profile.ts +++ b/src/api/system/user/profile.ts @@ -16,10 +16,6 @@ export interface ProfileVO { id: number name: string }[] - socialUsers: { - type: number - openid: string - }[] email: string mobile: string sex: number diff --git a/src/components/Cropper/src/CopperModal.vue b/src/components/Cropper/src/CopperModal.vue index 05b8d87b..d9a4e341 100644 --- a/src/components/Cropper/src/CopperModal.vue +++ b/src/components/Cropper/src/CopperModal.vue @@ -181,7 +181,6 @@ function openModal() { } function closeModal() { - debugger dialogVisible.value = false } diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/Profile/components/UserAvatar.vue index 8f3bedbf..23ecc3af 100644 --- a/src/views/Profile/components/UserAvatar.vue +++ b/src/views/Profile/components/UserAvatar.vue @@ -18,7 +18,6 @@ import { useUserStore } from '@/store/modules/user' import { useUpload } from '@/components/UploadFile/src/useUpload' import { UploadRequestOptions } from 'element-plus/es/components/upload/src/upload' -// TODO @芋艿:合并到 ProfileUser 组件中,更简洁一点 defineOptions({ name: 'UserAvatar' }) defineProps({ @@ -30,10 +29,12 @@ const userStore = useUserStore() const cropperRef = ref() const handelUpload = async ({ data }) => { const { httpRequest } = useUpload() - const avatar = ((await httpRequest({ - file: data, - filename: 'avatar.png', - } as UploadRequestOptions)) as unknown as { data: string }).data + const avatar = ( + (await httpRequest({ + file: data, + filename: 'avatar.png' + } as UploadRequestOptions)) as unknown as { data: string } + ).data await updateUserProfile({ avatar }) // 关闭弹窗,并更新 userStore diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/Profile/components/UserSocial.vue index b7f955be..8d253547 100644 --- a/src/views/Profile/components/UserSocial.vue +++ b/src/views/Profile/components/UserSocial.vue @@ -23,7 +23,7 @@