From ca60df17223af3579f358d8c2e42bdaeab24e731 Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 28 Nov 2024 17:34:30 +0800 Subject: [PATCH] add some --- src/gonganxitong/contract.go | 2 +- src/gonganxitong/document.go | 8 ++++---- src/gonganxitong/photo.go | 1 + src/gonganxitong/portal.css | 1 + src/renzhengshouquan/auth.go | 6 ++++-- src/renzhengshouquan/cert.go | 20 ++++++++++++-------- 6 files changed, 23 insertions(+), 15 deletions(-) diff --git a/src/gonganxitong/contract.go b/src/gonganxitong/contract.go index 41a19da..ec0a8b0 100644 --- a/src/gonganxitong/contract.go +++ b/src/gonganxitong/contract.go @@ -11,7 +11,7 @@ type contract struct { } func (s contract) List(m *ice.Message, arg ...string) { - m.Display("") + m.Echo("功能正在开发中,敬请等待。") } func init() { ice.TeamCtxCmd(contract{Table: newTable()}) } diff --git a/src/gonganxitong/document.go b/src/gonganxitong/document.go index a04a519..382dd4f 100644 --- a/src/gonganxitong/document.go +++ b/src/gonganxitong/document.go @@ -5,11 +5,11 @@ import "shylinux.com/x/ice" type document struct { Table order string `data:"93"` - fields string `data:"title,content,user_uid"` - create string `name:"create title* content*" role:"leader"` - remove string `name:"remove" role:"leader"` + fields string `data:"user_uid"` } -func (s document) List(m *ice.Message, arg ...string) { s.ValueList(m, arg).Display("") } +func (s document) List(m *ice.Message, arg ...string) { + m.Echo("功能正在开发中,敬请等待。") +} func init() { ice.TeamCtxCmd(document{Table: newTable()}) } diff --git a/src/gonganxitong/photo.go b/src/gonganxitong/photo.go index 1e1d3ba..29a82b6 100644 --- a/src/gonganxitong/photo.go +++ b/src/gonganxitong/photo.go @@ -11,6 +11,7 @@ type photo struct { } func (s photo) List(m *ice.Message, arg ...string) { + m.Echo("功能正在开发中,敬请等待。") } func init() { ice.TeamCtxCmd(photo{Table: newTable()}) } diff --git a/src/gonganxitong/portal.css b/src/gonganxitong/portal.css index ac1786e..dbda0dc 100644 --- a/src/gonganxitong/portal.css +++ b/src/gonganxitong/portal.css @@ -73,6 +73,7 @@ $output div.item.card div.title span.time { position:absolute; right:0; font-siz $output div.item.card div.title div.action input { margin-right:0; } $output div.item.card div.status span { word-break:break-all; } $output div.item.card img { border-radius:5px; padding:0; margin:0; margin-right:10px; height:48px; width:48px; min-width:48px; object-fit:cover; } +$output div.item.card div.container img { margin-right:0; height:100%; width:100%; } $output div.item.card.sticky>div.output { background-color:var(--plugin-bg-color); color:var(--notice-bg-color); } $action div.item.notice input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); } $action div.item.danger input[type=button] { border:var(--box-danger); color:var(--danger-bg-color); } diff --git a/src/renzhengshouquan/auth.go b/src/renzhengshouquan/auth.go index fe205df..5ac9921 100644 --- a/src/renzhengshouquan/auth.go +++ b/src/renzhengshouquan/auth.go @@ -24,6 +24,8 @@ func (s Auth) List(m *ice.Message, arg ...string) { s.Select(m, model.FROM_UID, arg[0]).Action() m.Sort("auth_status,created_at", []string{"2"}, "str_r") } else if len(arg) == 2 { + m.Cmdy(s.cert, arg[1]).PushAction().Action() + return s.SelectDetail(m, model.FROM_UID, arg[0], model.UID, arg[1]).Action(s.CertList, s.MemberList) } m.Table(func(value ice.Maps) { @@ -44,10 +46,10 @@ func (s Auth) SelectList(m *ice.Message, arg ...string) { s.RewriteAppend(m) } func (s Auth) MemberList(m *ice.Message, arg ...string) { - m.Cmdy(m.Prefix("member"), arg[0]) + m.Cmdy(m.Prefix("member"), arg[1]) } func (s Auth) CertList(m *ice.Message, arg ...string) { - m.Cmdy(s.cert, arg[0]).Action() + m.Cmdy(s.cert, arg[1]).Action() kit.If(m.Length() == 0, func() { m.Echo("没有上传证件") }) } func (s Auth) Issue(m *ice.Message, arg ...string) { diff --git a/src/renzhengshouquan/cert.go b/src/renzhengshouquan/cert.go index 139e74b..67f47e9 100644 --- a/src/renzhengshouquan/cert.go +++ b/src/renzhengshouquan/cert.go @@ -13,10 +13,10 @@ import ( type cert struct { Table order string `data:"1"` - fields string `data:"cert_status,path,number,name,type,address,mobile,verify,user_uid"` + fields string `data:"cert_status,path,number,name,type,person,address,mobile,verify,user_uid"` upload string `name:"upload" role:"leader"` remove string `name:"remove" role:"leader"` - verify string `name:"verify mobile* verify*" role:"void"` + verify string `name:"verify mobile* verify*" style:"notice" role:"leader"` } func (s cert) Upload(m *ice.Message, arg ...string) { @@ -49,20 +49,20 @@ func (s cert) List(m *ice.Message, arg ...string) { s.Select(m, model.AUTH_UID, arg[0]).Table(func(value ice.Maps) { switch CertStatus(kit.Int(value[model.CERT_STATUS])) { case CertUpload: - m.PushButton(s.Verify) + m.PushButton(s.Verify, s.Remove) case CertVerify: - m.PushButton(s.Check) + m.PushButton(s.Check, s.Remove) default: m.PushButton() } - }).Action(s.Upload).Display("").DisplayCSS("") + }).Action().Display("").DisplayCSS("") s.Button(m, "", s.Upload) } } func (s cert) Verify(m *ice.Message, arg ...string) { msg := s.Select(m.Spawn(), m.OptionSimple(model.AUTH_UID)...) if msg.Append(model.VERIFY) == "" { - verify := kit.Format("%06d", rand.Intn(10000)) + verify := kit.Format("%06d", rand.Intn(1000000)) s.Update(m, kit.Dict(model.MOBILE, m.Option(model.MOBILE), model.VERIFY, verify), m.OptionSimple(model.AUTH_UID)...) m.Cmd(SmsVendor, SmsVendor.Send, m.Option(model.MOBILE), verify) } else { @@ -72,8 +72,12 @@ func (s cert) Verify(m *ice.Message, arg ...string) { } } func (s cert) Check(m *ice.Message, arg ...string) { - if !m.Cmdy(RealnameVendor, RealnameVendor.Check, m.Option(model.MOBILE), m.Option(model.NUMBER), m.Option(model.NAME)).IsErr() { - s.Update(m, kit.Dict(model.STATUS, CertCheck), m.OptionSimple(model.AUTH_UID, model.UID)...) + if m.Option(model.PERSON) != "" { + msg := s.Select(m.Spawn(), model.USER_UID, m.Option(model.USER_UID), model.NAME, m.Option(model.PERSON)) + m.Options(msg.AppendSimple(model.NUMBER, model.NAME)) + } + if !m.Cmdy(RealnameVendor, RealnameVendor.Check, m.Option(model.MOBILE), m.Option(model.NUMBER), kit.Select(m.Option(model.NAME), m.Option(model.PERSON))).IsErr() { + s.Update(m, kit.Dict(model.STATUS, CertCheck), m.OptionSimple(model.AUTH_UID)...) } } func init() { ice.TeamCtxCmd(cert{}) }