From 041aaa51c8a66455859edbec8b46af7ff52b07a6 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Wed, 5 Jan 2022 11:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=88=97=E8=A1=A8=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5=E4=BD=BF=E7=94=A8=E5=BE=85=E5=AE=A1=E6=A0=B8=E3=80=81?= =?UTF-8?q?=E5=85=B3=E9=94=AE=E8=AF=8D=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/web/actions/default/users/index.go | 18 +++++++++---- web/views/@default/users/index.html | 30 ++++++++++++++++++--- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/internal/web/actions/default/users/index.go b/internal/web/actions/default/users/index.go index ce1bdcb1..f2981d90 100644 --- a/internal/web/actions/default/users/index.go +++ b/internal/web/actions/default/users/index.go @@ -16,9 +16,16 @@ func (this *IndexAction) Init() { } func (this *IndexAction) RunGet(params struct { - Keyword string + Keyword string + Verifying bool }) { - countResp, err := this.RPC().UserRPC().CountAllEnabledUsers(this.AdminContext(), &pb.CountAllEnabledUsersRequest{Keyword: params.Keyword}) + this.Data["keyword"] = params.Keyword + this.Data["isVerifying"] = params.Verifying + + countResp, err := this.RPC().UserRPC().CountAllEnabledUsers(this.AdminContext(), &pb.CountAllEnabledUsersRequest{ + Keyword: params.Keyword, + IsVerifying: params.Verifying, + }) if err != nil { this.ErrorPage(err) return @@ -28,9 +35,10 @@ func (this *IndexAction) RunGet(params struct { this.Data["page"] = page.AsHTML() usersResp, err := this.RPC().UserRPC().ListEnabledUsers(this.AdminContext(), &pb.ListEnabledUsersRequest{ - Keyword: params.Keyword, - Offset: page.Offset, - Size: page.Size, + Keyword: params.Keyword, + IsVerifying: params.Verifying, + Offset: page.Offset, + Size: page.Size, }) if err != nil { this.ErrorPage(err) diff --git a/web/views/@default/users/index.html b/web/views/@default/users/index.html index e6620e1e..7dc2a14a 100644 --- a/web/views/@default/users/index.html +++ b/web/views/@default/users/index.html @@ -1,9 +1,27 @@ {$layout} - 创建 + 全部用户 + 待审核 + | + [创建用户] +
+
+ +
+
+ +
+
+ +   + [清除条件] +
+
+
+

暂时还没有用户。

@@ -19,7 +37,9 @@ - +
- {{user.username}} + + {{user.username}} +
未审核
@@ -27,13 +47,15 @@ 已拒绝
{{user.fullname}} + {{user.fullname}} + {{user.cluster.name}} - - {{user.mobile}} + {{user.mobile}} - {{user.createdTime}}