mirror of
https://shylinux.com/x/community
synced 2025-07-01 13:14:44 +08:00
add some
This commit is contained in:
parent
b7f54a012a
commit
1e699df15a
@ -20,6 +20,9 @@ type clean struct {
|
||||
}
|
||||
|
||||
func (s clean) List(m *ice.Message, arg ...string) {
|
||||
if !m.IsTech() {
|
||||
return
|
||||
}
|
||||
m.Display("/plugin/table.js")
|
||||
if len(arg) == 0 {
|
||||
s.Tables.Tables(m, kit.Format("left join %s on %s = %s", s.TableNames(s.UserPlace), s.Key(s.UserPlace, s.Keys(s.Place, model.UID)), s.Key(s.Place, model.UID)))
|
||||
|
@ -46,7 +46,7 @@ type Table struct {
|
||||
upload string `name:"upload" role:"worker"`
|
||||
list string `name:"list place_uid uid auto" role:"void"`
|
||||
pushPublic string `name:"pushPublic domain_uid*:select title* content price" role:"leader"`
|
||||
marketInsert string `name:"marketInsert domain_uid*:select title* content price" style:"notice" role:"leader"`
|
||||
marketInsert string `name:"marketInsert domain_uid*:select title* content price" role:"leader"`
|
||||
marketPlaceInfo string `name:"marketPlaceInfo" role:"void"`
|
||||
messagePlaceInfo string `name:"messagePlaceInfo" role:"void"`
|
||||
sendMessage string `name:"sendMessage from_user_uid*:select to_user_uid*:select title* content price" style:"notice" role:"worker"`
|
||||
@ -184,6 +184,9 @@ func (s Table) ValueRemove(m *ice.Message, arg ...string) {
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.Message {
|
||||
if len(arg) == 0 {
|
||||
return m
|
||||
}
|
||||
if len(arg) > 0 {
|
||||
kit.If(len(fields) == 0, func() { fields = kit.TransArgs(kit.Split(m.Config(mdb.FIELDS), ",", ",")) })
|
||||
defer m.Options(db.FIELDS, fields).Set(ice.MSG_OPTION, db.FIELDS)
|
||||
@ -392,7 +395,7 @@ func (s Table) TransRole(m *ice.Message, arg ...string) string {
|
||||
return kit.Format(`<span class="role %s %s">%s</span>`, value, kit.Select("", arg, 1), role)
|
||||
}
|
||||
func (s Table) TransPrice(m *ice.Message, arg []string, field ...string) []string {
|
||||
kit.If(len(field) == 0, func() { field = append(field, "price", "amount") })
|
||||
kit.If(len(field) == 0, func() { field = append(field, model.PRICE, model.AMOUNT) })
|
||||
for i := 0; i < len(arg)-1; i += 2 {
|
||||
if kit.IndexOf(field, arg[i]) > -1 {
|
||||
arg[i+1] = kit.Format(kit.Int(kit.Float(arg[i+1]) * 100))
|
||||
@ -405,7 +408,7 @@ func (s Table) Button(m *ice.Message, info string, arg ...ice.Any) *ice.Message
|
||||
return m
|
||||
}
|
||||
func (s Table) EchoQRCodeIcon(m *ice.Message, link, icon, title string) {
|
||||
m.EchoQRCode(link).Echo(title).EchoImages(icon, "32", "avatar")
|
||||
m.EchoQRCode(link).Echo(title).EchoImages(icon, "32", model.AVATAR)
|
||||
}
|
||||
func (s Table) Link(m *ice.Message, arg ...string) string {
|
||||
return m.Cmdx(s.PrefixPortal(m), s.Link, arg)
|
||||
|
@ -23,7 +23,13 @@ func (s grant) List(m *ice.Message, arg ...string) {
|
||||
if m.Option(ice.FROM_DAEMON) == "" {
|
||||
m.EchoQRCode(m.MergePodCmd("", m.PrefixKey(), ice.FROM_DAEMON, m.Option(ice.MSG_DAEMON)))
|
||||
} else {
|
||||
m.EchoInfoButton("请授权登录", s.Confirm)
|
||||
msg := s.spaceInfo(m)
|
||||
m.Option(ice.MSG_USERUA, msg.Append(aaa.UA))
|
||||
m.Options(web.ParseUA(m.Message))
|
||||
m.EchoInfoButton(kit.Format("请授权登录\n\n%s %s %s\n%s",
|
||||
m.Option(model.AGENT), m.Option(model.SYSTEM), msg.Append(aaa.IP),
|
||||
kit.Format(web.PublicIP(m.Message, m.Option(ice.MSG_USERIP))),
|
||||
), s.Confirm)
|
||||
}
|
||||
kit.If(m.IsTech(), func() { m.Action(s.Header) })
|
||||
}
|
||||
|
@ -31,13 +31,15 @@ func (s notice) Remove(m *ice.Message, arg ...string) {
|
||||
func (s notice) List(m *ice.Message, arg ...string) {
|
||||
if len(arg) == 1 {
|
||||
s.Select(m, model.PLACE_UID, arg[0])
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
kit.If(key == model.UPDATED_AT, func() { value = kit.Select(m.Appendv(model.CREATED_AT)[index], value) })
|
||||
return value
|
||||
})
|
||||
m.SortStrR(model.UPDATED_AT)
|
||||
} else if len(arg) == 2 {
|
||||
s.SelectDetail(m, model.PLACE_UID, arg[0], model.UID, arg[1])
|
||||
}
|
||||
m.RewriteAppend(func(value, key string, index int) string {
|
||||
kit.If(key == model.UPDATED_AT, func() { value = kit.Select(m.Appendv(model.CREATED_AT)[index], value) })
|
||||
return value
|
||||
}).SortStrR(model.UPDATED_AT)
|
||||
s.Display(m, "").DisplayCSS("")
|
||||
kit.If(s.IsLeader(m), func() {
|
||||
if m.PushAction(s.Modify, s.Remove); m.Length() == 0 {
|
||||
s.Button(m, "")
|
||||
|
@ -1,11 +1,10 @@
|
||||
$body.dark { --plugin-bg-color:#0d1117; --output-bg-color:#171a22; }
|
||||
$body.light { --plugin-bg-color:#f2f4f8; --output-bg-color:white; --notice-bg-color:#006fff; }
|
||||
// $body.light { --plugin-bg-color:#f2f4f8; --output-bg-color:white; --notice-bg-color:#006fff; background-color:#dbe7fe; }
|
||||
body.light fieldset.web.team.portal>div.output>div.header { background-image:linear-gradient(#dbe7fe, var(--plugin-bg-color)); }
|
||||
body.dark $output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:yellow; white-space:pre; }
|
||||
$action { width:100%; position:absolute; top:0; z-index:1; display:none; }
|
||||
$action div.item { margin-right:0; height:48px; }
|
||||
$action div.item input[type=button] { background-color:transparent; color:var(--notice-bg-color); height:48px; min-width:20px; padding:0 10px; }
|
||||
$action { width:100%; height:48px; position:absolute; top:0; z-index:1; display:none; align-items:center; }
|
||||
$action div.item { margin-right:0; }
|
||||
$action div.item input[type=button] { background-color:transparent; color:var(--notice-bg-color); min-width:20px; padding:0 10px; }
|
||||
$action div.item.danger input[type=button] { color:var(--danger-bg-color); }
|
||||
$action div.item.button i { display:none; }
|
||||
$action div.item.button span { display:none; }
|
||||
@ -18,19 +17,18 @@ $action div.item.text.filter input:focus { border:var(--box-border); }
|
||||
$action div.item.user_info img { height:32px; border-radius:20px; margin-left:10px; }
|
||||
$action div.item.user_info { padding:10px; }
|
||||
$action div.item.user_info>div.name { display:flex; flex-direction:column; align-items:end; }
|
||||
$action div.item.user_info>div.name>span.time { font-size:10px; color:var(--disable-fg-color); }
|
||||
$action div.item.user_info>div.name>span.time { font-size:10px; color:var(--label-fg-color); }
|
||||
$action div.item.space { flex-grow:1; }
|
||||
fieldset>div.output>div.tabs { display:flex; }
|
||||
fieldset.input.key>div.output>div.tabs { display:none; }
|
||||
fieldset>div.output>div.tabs>div.item { padding:5px; line-height:20px; }
|
||||
// fieldset>div.output div.item.card div.title span.role { display:none; }
|
||||
fieldset.input.key>div.output>div.tabs { display:none; }
|
||||
$output { background-color:var(--plugin-bg-color); }
|
||||
$output>div.header { background-image:linear-gradient(var(--notice-bg-color), var(--plugin-bg-color)); height:240px; width:100%; position:absolute; left:0; }
|
||||
$output>div.header img { height:100%; width:100%; object-fit:cover; }
|
||||
$output>div.action>div.list { margin:0 10px; }
|
||||
$output>div>div.code { margin-bottom:20px; display:flex; flex-direction:column; align-items:center; }
|
||||
$output>div>div.list { border-radius:10px; background-color:var(--output-bg-color); padding:10px; margin:10px; }
|
||||
$output>div>div.list>div.title { font-weight:bold; border-left:var(--box-notice3); padding-left:10px; display:flex; align-items:center; }
|
||||
$output>div>div.list>div.title { font-weight:bold; border-left:var(--box-notice3); padding-left:10px; margin:10px 0; display:flex; align-items:center; }
|
||||
$output>div>div.list>div.title span:first-child { flex-grow:1; }
|
||||
$output>div>div.list>div.title div.action { overflow:hidden; }
|
||||
$output>div>div.list>div.title div.action div.item { margin-right:5px; }
|
||||
@ -39,7 +37,7 @@ $output>div>div.list>div.title div.action div.item.filter input:focus { width:32
|
||||
$output>div>div.list>div.title div.action div.item.button.icons input { display:none; }
|
||||
$output>div>div.list>div.role:not(.hide) { display:flex; align-items:center; justify-content:space-around; }
|
||||
$output>div>div.list>div.role span { padding:5px; cursor:pointer; white-space:pre; }
|
||||
$output>div>div.list>div.role span:not(.select) { color:gray; }
|
||||
$output>div>div.list>div.role span:not(.select) { color:var(--label-fg-color); }
|
||||
$output>div>div.list>div.role span.select { border-bottom:var(--box-notice); }
|
||||
$output>div>div.list>div.role span.creator.select { border-bottom:var(--box-danger); }
|
||||
$output>div>div.list>div.role span.landlord.select { border-bottom:var(--box-danger); }
|
||||
@ -71,9 +69,11 @@ $output>div.action { background-color:var(--output-bg-color); }
|
||||
$output div.item.card:not(:last-child) { margin-bottom:2px; }
|
||||
$output div.item.card.sticky { position:sticky; top:0; z-index:2; }
|
||||
$output div.item.card.loaded { position:sticky; top:0; z-index:2; }
|
||||
$output div.item.card>div.action { top:24px; }
|
||||
$output div.item.card div.title { width:100%; display:flex; align-items:center; position:relative; }
|
||||
body:not(.mobile) $output div.item.card>div.action { top:24px; }
|
||||
$output fieldset.story>div.output div.place_info div.item.card>div.action { top:12px; }
|
||||
$output div.item.card div.title { font-size:var(--body-font-size); width:100%; display:flex; align-items:center; position:relative; }
|
||||
$output div.item.card div.title span:first-child { word-break:break-all; }
|
||||
body.mobile $output div.item.card div.title span:first-child { font-weight:bold; }
|
||||
$output div.item.card div.title span.type { line-height:18px; }
|
||||
$output div.item.card div.title span.status { line-height:18px; }
|
||||
$output div.item.card div.title span.price { color:var(--danger-bg-color); }
|
||||
@ -84,10 +84,12 @@ body.width1 $output div.item.card div.title div.space { flex-grow:1; }
|
||||
$output div.item.card div.title div.action input { margin-right:0; }
|
||||
$output div.item.card div.action input { padding:0 10px; margin-left:0; margin-right:0; }
|
||||
body.width1 $output div.item.card>div.action { max-width:240px; display:flex; flex-wrap:wrap; justify-content:center; }
|
||||
$output div.item.card div.status span { word-break:break-all; }
|
||||
$output div.item.card div.status span { word-break:break-all; color:var(--label-fg-color); }
|
||||
$output div.item.card div.container div.status img { height:24px; width:24px; min-width:24px; }
|
||||
$output div.item.card div.container { flex-grow:1; }
|
||||
$output div.item.card img { border-radius:5px; padding:0; margin:0; height:40px; width:40px; min-width:40px; object-fit:cover; }
|
||||
$output div.item.card img:not(:last-child) { margin-right:10px; }
|
||||
$output div.item.card img:last-child { margin-left:10px; }
|
||||
$output div.item.card div.container img { margin-right:0; height:100%; width:100%; }
|
||||
$output div.item.card div.container>div.action { position:relative; float:right; }
|
||||
body:not(.width1) $output div.item.card div.title>div.action { display:none; }
|
||||
@ -103,6 +105,8 @@ $output div.output>div.code>img.avatar {
|
||||
}
|
||||
$output input[type=button][name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output input.notice[type=button] { background-color:transparent; color:var(--notice-bg-color); }
|
||||
body:not(.mobile) $output input.notice[type=button]:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body:not(.mobile) $output input.danger[type=button]:hover { background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
$output input.danger[type=button] { color:var(--danger-bg-color); }
|
||||
$output span.type { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); white-space:pre; font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
$output span.role { border:none; border-radius:5px; background-color:var(--hover-bg-color); color:var(--notice-bg-color); white-space:pre; font-size:var(--status-font-size); line-height:18px; padding:2px 8px; }
|
||||
@ -118,6 +122,8 @@ $output table.content td.action input.icons { display:unset; }
|
||||
$output table.content.detail input { border:none; }
|
||||
$output table.content.detail thead { display:none; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
$output table.content.detail tr.title { font-weight:bold; }
|
||||
body.mobile $output table.content.detail tr.title td:last-child { font-weight:bold; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action input[type=button] { padding:0 10px; margin-right:0; }
|
||||
@ -127,7 +133,7 @@ $output div.head div.item.card div.title div.item.button i { display:none; }
|
||||
$output div.tabs { height:32px; display:flex; position:unset; }
|
||||
$output div.tabs span { padding:5px 10px; }
|
||||
$output div.tabs span.select { background-color:var(--output-bg-color); color:var(--hover-fg-color); }
|
||||
$output div.item.title { border-left:var(--box-notice3); background-color:var(--plugin-bg-color); padding:10px; margin-left:10px; }
|
||||
$output div.item.title { border-left:var(--box-notice3); background-color:var(--plugin-bg-color); padding:0; padding-left:10px; margin:10px; }
|
||||
$output div.item.title.noteList { border-left:var(--box-danger3); }
|
||||
$output div.item.title.fileList { border-left:var(--box-danger3); }
|
||||
$output div.item.title.meetList { border-left:var(--box-danger3); }
|
||||
@ -135,16 +141,26 @@ $output div.item.title.dealList { border-left:var(--box-danger3); }
|
||||
$output div.item.title div.action div.item.notice input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output>div.tabs { background-color:var(--plugin-bg-color); display:flex; overflow:auto; position:sticky; top:0; z-index:2; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item { white-space:pre; line-height:22px; padding:5px; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.all { position:sticky; left:0; z-index:1; }
|
||||
$output fieldset.story>div.output>div.tabs.wrap { border-bottom: var(--box-border); height:unset; max-height:320px; flex-direction:column; }
|
||||
$output fieldset.story>div.output>div.tabs div.item.wrap { text-align:center; padding:5px 10px; position:sticky; right:0; bottom:0; }
|
||||
$output fieldset.story>div.output>div.tabs div.item.wrap:not(:hover) { color:var(--notice-bg-color) !important; }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.tabs div.item.wrap:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item { white-space:pre; line-height:22px; padding:5px 10px; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item:not(.select) { color:var(--label-fg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.all { position:sticky; left:0; top:0; z-index:1; }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.tabs>div.item.all:hover { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.select { border-top:var(--box-notice); background-color:var(--output-bg-color); }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.select { position:sticky; right:0; }
|
||||
body.mobile $output fieldset.story>div.output>div.tabs>div.item.select { font-weight:bold; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.select:not(.all) { position:sticky; }
|
||||
$output fieldset.story>div.output>div.tabs>div.item.danger.select { border-top:var(--box-danger); background-color:var(--output-bg-color); }
|
||||
$output fieldset.story.otherList>div.output>div.todo { display:none; }
|
||||
$output fieldset.story>div.output>div.todo { padding:5px 10px 20px; }
|
||||
$output fieldset.story>div.output>div.todo>div.item { display:flex; align-items:center; justify-content:center; }
|
||||
$output fieldset.story>div.output>div.todo>div.item { display:flex; align-items:center; justify-content:center; flex-grow:1; }
|
||||
$output fieldset.story>div.output>div.todo>div.item span { display:none; }
|
||||
$output fieldset.story>div.output>div.todo>div.item input { min-width:120px; }
|
||||
$output fieldset.story>div.output>div.todo>div.item input { width:100%; }
|
||||
body.mobile $output fieldset.story>div.output div.item.card input[name=approve] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.mobile $output fieldset.story>div.output div.item.card input[name=process] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.mobile $output fieldset.story>div.output div.item.card input[name=finish] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output fieldset.story>div.output>div.todo>div.item.notice input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output>div.todo>div.item.notice input:hover { background-color:var(--hover-bg-color); color:var(--notice-bg-color); }
|
||||
$output>fieldset.market div.tabs { display:flex; width:100%; overflow:auto; height:30px; position:sticky; top:0; z-index:1; }
|
||||
@ -171,6 +187,12 @@ $output fieldset.story>div.output { background-color:var(--plugin-bg-color); }
|
||||
$output fieldset.story>div.output>div.place_info { position:sticky; top:0; z-index:3; }
|
||||
$output fieldset.story>div.output table.content td { box-shadow:none; }
|
||||
$output fieldset.story>div.output table.content.detail td:last-child { text-align:left; }
|
||||
$output fieldset.story>div.output table.content.detail td:first-child { background-color:unset; color:var(--label-fg-color); }
|
||||
$output fieldset.story>div.output table.content.detail tr.action { background-color:var(--output-bg-color); }
|
||||
body:not(.mobile) $output fieldset.story>div.output table.content.detail tr.action:hover { background-color:var(--hover-bg-color); }
|
||||
$output fieldset.story>div.output table.content.detail tr.action td.action { background-color:unset; }
|
||||
$output fieldset.story>div.output table.content.detail tr.action td.action { background-color:unset; }
|
||||
body:not(.mobile) $output fieldset.story>div.output table.content.detail tr.action td.action input:not(:hover) { background-color:unset; }
|
||||
$output fieldset.story>div.output table.content td img { max-width:100%; }
|
||||
$output fieldset.story>div.output table.content tr.icon td img { max-height:128px; max-width:128px; }
|
||||
$output fieldset.story>div.output table.content tr.user_avatar td img { max-height:128px; max-width:128px; }
|
||||
@ -193,7 +215,6 @@ $output fieldset.story.web.team.dashboard.summary>div.output { min-height:64px;
|
||||
$output fieldset.story.web.team.dashboard.summary>div.output>div.item { flex-grow:1; }
|
||||
$output fieldset.story.web.team.production.coder>div.output { background-color:var(--output-bg-color); }
|
||||
$output>fieldset.qrcode table.content td { text-align:center; }
|
||||
// $output>fieldset.market>div.output>div.list div.item.card img { height:48px; width:48px; min-width:48px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.username { color:#576b95; font-weight:bold; font-size:14px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.status>span.time { float:right; line-height:20px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action { color:gray; font-size:14px; width:100%; max-width:100%; display:flex; justify-content:space-around; position:relative; }
|
||||
@ -213,8 +234,11 @@ $body.width1 div.upload.float { display:none; }
|
||||
body.width1 $action div.item.text.filter { flex-grow:1; }
|
||||
body.width1 $output div.item.card div.container>div.title>span.price { margin-left:auto; }
|
||||
body.width1 $output div.item.card div.container>div.title>span.status { margin-left:auto; }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info { min-height:68px; }
|
||||
$output fieldset.story>div.output>div.place_info>div.item>div.output { background-color:var(--plugin-bg-color); }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info { min-height:50px; background-color:var(--output-bg-color); }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info div.item.card { background-color:var(--output-bg-color); }
|
||||
body.width1 $output fieldset.story>div.output>div.place_info div.item.card div.output { background-color:var(--output-bg-color); }
|
||||
$output fieldset.story>div.output>div.place_info>div.item>div.output { background-color:var(--output-bg-color); }
|
||||
$output fieldset.story>div.output>div.place_info>div.item>div.output:hover { background-color:var(--hover-bg-color); }
|
||||
$output fieldset.story>div.output>table.detail tr.created_at { display:none; }
|
||||
$output fieldset.story>div.output>table.detail tr.updated_at { display:none; }
|
||||
$output fieldset.story>div.output>table.detail tr.user_name { display:none; }
|
||||
|
@ -30,7 +30,7 @@ type Portal struct {
|
||||
short string `data:"index"`
|
||||
field string `data:"time,icons,name,index,order,enable,type,auth,role,view,init,portal"`
|
||||
create string `name:"create index name icons"`
|
||||
list string `name:"list place_uid index uid auto" role:"void"`
|
||||
list string `name:"list place_uid index uid auto" help:"用户场景" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name*:select street_name* place_name* place_type:select address" icon:"bi bi-plus-circle" role:"void"`
|
||||
placeRemove string `name:"placeRemove" role:"void"`
|
||||
}
|
||||
|
@ -193,11 +193,11 @@ Volcanos(chat.ONIMPORT, {
|
||||
p.onimport.size(p, can.ConfHeight()-can._action.offsetHeight, can.ConfWidth())
|
||||
})
|
||||
can.core.List(can._plugins, function(p) {
|
||||
p.onimport.size(p, can.ConfHeight(), can.ConfWidth())
|
||||
p.onimport.size(p, can.ConfHeight(), can.ConfWidth()-40)
|
||||
})
|
||||
} else if (!can._stacks_current) {
|
||||
can.core.List(can._plugins, function(p) {
|
||||
p.onimport.size(p, can.ConfHeight(), can.ConfWidth())
|
||||
p.onimport.size(p, can.ConfHeight(), can.ConfWidth()-40)
|
||||
})
|
||||
}
|
||||
},
|
||||
@ -208,6 +208,7 @@ Volcanos(chat.ONACTION, {
|
||||
can.user.isMobile && can.page.style(can, sub._target, html.MAX_HEIGHT, can.page.height())
|
||||
can.user.isMobile && can._root.Inputs && can._root.Inputs.appendChild(sub._target)
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, html.HIDDEN)
|
||||
can.onaction._beforeInputs && can.onaction._beforeInputs(event, can, button, sub)
|
||||
if (!can.misc.isDebug(can)) { return }
|
||||
if (!can.user.isTechOrRoot(can)) { return }
|
||||
sub.Option("city_name", "深圳市")
|
||||
@ -230,6 +231,7 @@ Volcanos(chat.ONACTION, {
|
||||
sub.Option("grade", "2024级")
|
||||
},
|
||||
afterInputs: function(event, can, button, sub) {
|
||||
can.onaction._afterInputs && can.onaction._afterInputs(event, can, button, sub)
|
||||
can.onmotion.delay(can, function() { can._root.Action.onlayout._init(can) })
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._output, html.VISIBILITY, "")
|
||||
can.user.isMobile && can.page.style(can, can._root.Action._target, html.DISPLAY, "")
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"portal": "用户场景", "placeCreate": "创建", "placeRemove": "删除",
|
||||
"placeCreate": "创建", "placeRemove": "删除",
|
||||
"credit": "用户名片", "member": "组织成员", "setting": "服务配置",
|
||||
"qrcode": "场景码", "event": "事件流", "apply": "权限申请", "allow": "权限审批", "notice": "通知公告",
|
||||
"market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
|
||||
|
@ -4,7 +4,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
if (value.type == "title") {
|
||||
return {view: [[html.ITEM, html.TITLE], "", can.user.trans(can, value.name, value.help)]}
|
||||
}
|
||||
return {view: [[html.ITEM, value.type, value.name]], list: [{text: [value.help||can.user.trans(can, value.name, null, "value.setting"), "", mdb.NAME]}, can.onimport[value.type](can, value)]}
|
||||
return {view: [[html.ITEM, value.type, value.name]], list: [{text: [can.user.trans(can, value.name, value.help, "value.setting"), "", mdb.NAME]}, can.onimport[value.type](can, value)]}
|
||||
}))
|
||||
if (!can.misc.isDebug(can)) { return }
|
||||
can.user.isTechOrRoot(can) && can.onimport._plugin(can, {index: "can.cookie"})
|
||||
|
@ -1,8 +1,9 @@
|
||||
package renzhengshouquan
|
||||
|
||||
import (
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
"shylinux.com/x/ice"
|
||||
|
||||
"shylinux.com/x/community/src/renzhengshouquan/model"
|
||||
)
|
||||
|
||||
type account struct {
|
||||
@ -11,12 +12,12 @@ type account struct {
|
||||
auth string `data:"issued"`
|
||||
role string `data:"leader,worker"`
|
||||
fields string `data:"type,status,amount"`
|
||||
createDefault string `name:"createDefault" help:"开通默认账户" role:"leader"`
|
||||
create string `name:"create account_type*" role:"leader"`
|
||||
createDefault string `name:"createDefault" role:"leader" help:"开通默认账户"`
|
||||
remove string `name:"remove" role:"leader"`
|
||||
recharge string `name:"recharge amount* title content" role:"leader" help:"充值"`
|
||||
transfer string `name:"transfer amount* to_account_uid*:select title content" role:"leader" help:"转账"`
|
||||
withdraw string `name:"withdraw amount* title content" role:"leader" help:"提现"`
|
||||
recharge string `name:"recharge amount* title content" help:"充值" role:"leader"`
|
||||
transfer string `name:"transfer amount* to_account_uid*:select title content" help:"转账" role:"leader"`
|
||||
withdraw string `name:"withdraw amount* title content" help:"提现" role:"leader"`
|
||||
}
|
||||
|
||||
func (s account) SelectDefault(m *ice.Message, arg ...string) {
|
||||
@ -29,8 +30,7 @@ func (s account) CreateDefault(m *ice.Message, arg ...string) {
|
||||
s.ValueCreate(m, arg...)
|
||||
}
|
||||
func (s account) List(m *ice.Message, arg ...string) {
|
||||
s.ValueList(m, arg).Display("")
|
||||
if m.Length() == 0 {
|
||||
if s.ValueList(m, arg).Display(""); m.Length() == 0 {
|
||||
m.SetResult().EchoInfoButton("请开通默认账户", s.CreateDefault)
|
||||
} else {
|
||||
m.PushAction(s.Recharge, s.Transfer, s.Withdraw)
|
||||
@ -66,11 +66,13 @@ type AccountType int
|
||||
const (
|
||||
AccountDefault AccountType = iota
|
||||
AccountBank
|
||||
AccountWepay
|
||||
)
|
||||
|
||||
var AccountTypeList = map[AccountType]string{
|
||||
AccountDefault: "默认账户",
|
||||
AccountBank: "银行账户",
|
||||
AccountWepay: "微信支付",
|
||||
}
|
||||
|
||||
func (s AccountType) String() string { return AccountTypeList[s] }
|
||||
|
@ -14,13 +14,14 @@ import (
|
||||
type Portal struct {
|
||||
guanlixitong.Portal
|
||||
fields string `data:"name,info,avatar"`
|
||||
list string `name:"list auth_uid index uid auto" help:"认证授权" role:"void"`
|
||||
placeCreate string `name:"placeCreate auth_name* auth_info auth_type*:select from_uid*:select" role:"void"`
|
||||
}
|
||||
|
||||
func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
defer Auth{}.authSort(m)
|
||||
s.Portal.List(m, arg...)
|
||||
kit.If(len(arg) == 0 && m.Length() > 0, func() { m.PushAction(s.PlaceRemove).Action() })
|
||||
Auth{}.authSort(m)
|
||||
}
|
||||
func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
|
||||
switch AuthType(kit.Int(m.Option(model.AUTH_TYPE))) {
|
||||
|
@ -1,11 +1,10 @@
|
||||
{
|
||||
"portal": "认证授权",
|
||||
"cert": "上传证件", "auth": "认证授权", "profile": "用户名片", "account": "账户", "transition": "账单",
|
||||
"authMain": "认证主页", "memberList": "成员列表", "certList": "证件列表",
|
||||
"cityInfo": "城市信息", "streetInfo": "街道信息", "companyInfo": "公司信息", "personalInfo": "个人信息", "placeMain": "服务主页",
|
||||
"placeMain": "服务主页", "authMain": "认证主页", "memberList": "成员列表", "certList": "证件列表",
|
||||
"cityInfo": "城市信息", "streetInfo": "街道信息", "companyInfo": "公司信息", "personalInfo": "个人信息",
|
||||
"issue": "认证", "revoke": "吊销", "setScore": "排序",
|
||||
"admin": "管理后台",
|
||||
"enter": "进入", "verify": "验证",
|
||||
"admin": "管理后台",
|
||||
"style": {
|
||||
"issue": "notice",
|
||||
"revoke": "danger",
|
||||
@ -26,9 +25,11 @@
|
||||
"auth_name": "认证主体",
|
||||
"auth_type": "认证类型",
|
||||
"auth_status": "认证状态",
|
||||
"account_type": "账户类型",
|
||||
"transition_type": "流水类型",
|
||||
"from_account_uid": "来自",
|
||||
"to_account_uid": "转给",
|
||||
"amount": "金额",
|
||||
"mobile": "手机号",
|
||||
"verify": "验证码",
|
||||
"from_uid": "认证机构",
|
||||
@ -52,11 +53,11 @@
|
||||
"auth_type": {
|
||||
"root": "平台",
|
||||
"city": "城市",
|
||||
"personal": "个人",
|
||||
"service": "服务",
|
||||
"company": "公司",
|
||||
"school": "学校",
|
||||
"street": "街道",
|
||||
"school": "学校",
|
||||
"company": "公司",
|
||||
"service": "服务",
|
||||
"personal": "个人",
|
||||
"style": {
|
||||
"root": "danger",
|
||||
"city": "danger",
|
||||
@ -65,11 +66,11 @@
|
||||
"icons": {
|
||||
"root": "https://img.icons8.com/officel/80/console.png",
|
||||
"city": "https://img.icons8.com/officel/80/city-buildings.png",
|
||||
"personal": "https://img.icons8.com/officel/80/identification-documents--v1.png",
|
||||
"service": "https://img.icons8.com/officel/80/meeting-room.png",
|
||||
"company": "https://img.icons8.com/officel/80/organization.png",
|
||||
"street": "https://img.icons8.com/officel/80/building.png",
|
||||
"school": "https://img.icons8.com/officel/80/school.png",
|
||||
"street": "https://img.icons8.com/officel/80/building.png"
|
||||
"company": "https://img.icons8.com/officel/80/organization.png",
|
||||
"service": "https://img.icons8.com/officel/80/meeting-room.png",
|
||||
"personal": "https://img.icons8.com/officel/80/identification-documents--v1.png"
|
||||
}
|
||||
},
|
||||
"auth_status": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user