From e75ddc40ab06de93c6d9aad54bf2afcad3982296 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Tue, 8 Jul 2025 22:19:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=B8=89=E6=96=B9=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=9A=84=E7=BB=91=E5=AE=9A=EF=BC=8C=E4=BD=BF=E7=94=A8=20/syste?= =?UTF-8?q?m/social-user/get-bind-list=20=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/social/user/index.ts | 7 ++++++- src/api/system/user/profile.ts | 4 ---- src/components/Cropper/src/CopperModal.vue | 1 - src/views/Profile/components/UserAvatar.vue | 11 ++++++----- src/views/Profile/components/UserSocial.vue | 16 ++++++++-------- 5 files changed, 20 insertions(+), 19 deletions(-) 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 @@