From 9d475eacba291fb01c4788ad23a3846c7a752272 Mon Sep 17 00:00:00 2001 From: Odboy Date: Tue, 2 Jun 2026 21:08:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=8E=AF=E5=A2=83=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E7=8E=AF=E5=A2=83=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=EF=BC=8C=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=8F=8C=E5=8D=A1=E7=89=87=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/internal/handler/profile.go | 7 +++++- web/src/views/profile/ProfileList.vue | 36 +++++++++++++++++++++------ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/server/internal/handler/profile.go b/server/internal/handler/profile.go index ee56fa1..bb013f9 100644 --- a/server/internal/handler/profile.go +++ b/server/internal/handler/profile.go @@ -18,8 +18,13 @@ func NewProfileHandler() *ProfileHandler { } func (h *ProfileHandler) List(c *gin.Context) { + alias := c.Query("alias") + query := dao.Engine.Where("1=1") + if alias != "" { + query = query.Where("alias LIKE ?", "%"+alias+"%") + } var profiles []model.Profile - dao.Engine.Find(&profiles) + query.Find(&profiles) c.JSON(http.StatusOK, model.WrapperResponse{Code: 0, Data: profiles}) } diff --git a/web/src/views/profile/ProfileList.vue b/web/src/views/profile/ProfileList.vue index 8993025..6115813 100644 --- a/web/src/views/profile/ProfileList.vue +++ b/web/src/views/profile/ProfileList.vue @@ -1,10 +1,22 @@