This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-08-06 01:33:30 +08:00
parent 958719c479
commit b099a48807
6 changed files with 15 additions and 10 deletions

View File

@ -53,7 +53,7 @@ func (s apply) List(m *ice.Message, arg ...string) {
ApplyCancel.String(),
}, ice.STR_R)
} else if len(arg) == 2 {
s.Table.SelectDetail(m, model.USER_UID, m.Option(model.USER_UID), model.PLACE_UID, arg[0], model.APPLY_UID, arg[1])
s.Table.SelectDetail(m, model.USER_UID, m.Option(model.USER_UID), model.PLACE_UID, arg[0], s.Key(s, model.UID), arg[1])
if ApplyStatus(kit.Int(m.Append(model.APPLY_STATUS))) == ApplySubmit {
m.EchoQRCode(Portal{}.Link(m, arg[0], m.Prefix("order"), arg[1]))
}

View File

@ -108,7 +108,7 @@ func (s Table) SendTemplate(m *ice.Message, from, user_uid, title string) {
title, m.Option(s.Keys(s.Place, model.NAME))+" "+s.Place.TransValue(m, s.Keys(s.UserPlace, model.ROLE)), kit.Cut(m.Option(model.UID), 6))
}
}
func (s Table) Display(m *ice.Message) {
func (s Table) Display(m *ice.Message) *ice.Message {
m.Option("_place_uid", s.ToLower(kit.TypeName(s.Place))+"_uid")
m.Option("_place_name", s.ToLower(kit.TypeName(s.Place))+"_name")
m.Option("_place_type", s.ToLower(kit.TypeName(s.Place))+"_type")
@ -119,7 +119,8 @@ func (s Table) Display(m *ice.Message) {
if !kit.HasPrefix(file, nfs.PS, web.HTTP) {
file = m.Resource(path.Join(path.Dir(kit.FileLine(1, 100)), file))
}
m.Display(file).DisplayCSS("")
m.Display(file)
return m
}
type Tables struct {
@ -170,5 +171,5 @@ func PortalCmd(portal ice.Any) {
cmd("qrcode", qrcode{Tables: Tables{Table: table}})
cmd("apply", apply{Table: table})
cmd("order", order{Table: table})
cmd("event", event{})
cmd("event", event{Table: table})
}

View File

@ -16,13 +16,16 @@ $output>div.action div.item.button { margin-right:5px; }
$output>div.action div.item.button input { border:none; color:var(--notice-bg-color); min-width:80px; float:left; }
$output>div.action div.item.button span { display:none; }
$output>fieldset table.content td { box-shadow:none; }
$output div.item span.role { border:var(--box-notice); color:var(--notice-bg-color); padding:0 5px; }
$output div.item span.role.landlord { border-color:var(--box-danger); color:var(--danger-bg-color); }
$output div.item span.role.teacher { border-color:var(--box-danger); color:var(--danger-bg-color); }
$output span.role { border:var(--box-notice); color:var(--notice-bg-color); padding:2px 5px; }
$output span.role.landlord { border-color:var(--box-danger); color:var(--danger-bg-color); }
$output span.role.teacher { border-color:var(--box-danger); color:var(--danger-bg-color); }
$output span.role.leader { border-color:var(--box-danger); color:var(--danger-bg-color); }
body.en $output>fieldset table.content td:first-child { max-width:180px; width:unset;}
$output>fieldset table.content tr.uid { display:none; }
$output>fieldset table.content tr.order_uid { display:none; }
$output>fieldset table.content tr.place_uid { display:none; }
$output>fieldset table.content tr.group_uid { display:none; }
$output>fieldset table.content tr.class_uid { display:none; }
$output>fieldset table.content td img { max-width:100%; }
$output>fieldset.qrcode table.content td { text-align:center; }
$output>fieldset.qrcode div.code { text-align:center; }

View File

@ -48,7 +48,7 @@ func (s Portal) List(m *ice.Message, arg ...string) {
} else {
m.FieldsSetDetail().Cmdy(arg[1], mdb.SELECT, model.UID, arg[2]).PushAction().Action()
}
s.Display(m)
s.Display(m).DisplayCSS("")
}
func (s Portal) PlaceCreate(m *ice.Message, arg ...string) {
defer m.ToastProcess()()

View File

@ -84,7 +84,8 @@ Volcanos(chat.ONIMPORT, {
var ui = can.page.Append(can, can._output, [{view: html.ACTION}])
if (can.db.hash.length > 2 && can.db.hash[0] && can.db.hash[2]) { value.args = [can.db.hash[0], can.db.hash[2]] }
value.style = html.OUTPUT, value.height = can.ConfHeight()-html.ACTION_HEIGHT
can.onappend.plugin(can, value, function(sub) { refresh = function() { sub.Update() }
can.onappend.plugin(can, value, function(sub) {
refresh = function() { sub.Update(), can.user.toastSuccess(can, "refresh") }
can.core.List(["_trans", "_icons", "_style", "_trans.input", "_trans.value"], function(key) {
var value = sub.Conf(key); value && can.core.Item(can.Conf(key), function(k, v) { value[k] = value[k]||v })
})

View File

@ -14,7 +14,7 @@ import (
type user struct {
Table
template string `data:"4b-Z_r8dZmm1pHdd2h4A10VVYX4OIHvemlLjsHKBj2s"`
create string `name:"create openid* avatar nickname"`
create string `name:"create open_id* avatar nickname"`
email string `name:"email email*"`
}