用户列表可以使用待审核、关键词搜索

This commit is contained in:
GoEdgeLab
2022-01-05 11:12:28 +08:00
parent 6b02f3f812
commit 041aaa51c8
2 changed files with 39 additions and 9 deletions

View File

@@ -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)