This commit is contained in:
root 2024-10-22 07:35:59 +08:00
parent 74ebe817a4
commit d457bf5a6c
7 changed files with 16 additions and 9 deletions

View File

@ -251,7 +251,6 @@ func (s Table) Update(m *ice.Message, data ice.Any, arg ...string) {
if len(arg) == 0 {
arg = append(arg, model.UID, kit.Select(m.Option(model.UID), m.Option(s.Keys(m.CommandKey(), model.UID))))
}
m.Info("what %v", data)
s.Table.Update(m, data, arg...)
}
func (s Table) UpdateAuth(m *ice.Message, arg ...string) {

View File

@ -14,7 +14,9 @@ type domain struct {
}
func (s domain) Create(m *ice.Message, arg ...string) { s.Insert(m, arg...) }
func (s domain) Remove(m *ice.Message, arg ...string) { s.Delete(m, arg...) }
func (s domain) Remove(m *ice.Message, arg ...string) {
s.Delete(m.Options(model.UID, m.Option(model.DOMAIN_UID)))
}
func (s domain) List(m *ice.Message, arg ...string) {
s.Fields(m, model.UID, model.NAME)
if len(arg) == 0 {

View File

@ -7,7 +7,7 @@ body.width1 div.upload.float div.action { display:flex; }
body.width1 div.upload.float div.action div.item.upload { flex-grow:1; }
body.width1 div.upload.float div.action div.item.upload input { width:100%; }
$action { background-color:transparent; position:absolute; top:0; width:100%; z-index:1; }
$action div.item.button { margin-left:10px; margin-right:0; padding:0; height:48px; align-items:center; }
$action div.item { margin-left:10px; margin-right:0; padding:0; height:48px; align-items:center; }
$action div.item.button input { border:none; background-color:var(--plugin-bg-color); color:var(--notice-bg-color); min-width:60px; display:unset; }
$action div.item.button input:hover { background-color:var(--hover-bg-color); }
$action div.item.button span { display:none; }
@ -17,6 +17,7 @@ $output { background-color:var(--plugin-bg-color); }
$output>div.header { background-image:linear-gradient(var(--notice-bg-color), var(--plugin-bg-color)); height:300px; width:100%; position:absolute; left:0; }
$output>div.header img { height:100%; width:100%; object-fit:cover; }
$output div.output>div.code { font-size:16px; position:relative; }
$output table.content.detail thead { display:none; }
$output div.output>div.code img.avatar { border-radius:10px; height:64px !important; width:64px !important; object-fit:cover; position:absolute; top:153px; left:calc(50% - 32px); }
body.width6 $output>div.output>div.code img.avatar { top:183px; }
$output>div.action>div.list { margin:0 10px; }
@ -31,7 +32,7 @@ $output>div>div.list.mynotice>span:last-child { color:gray; }
$output>div>div.list>div.title { font-weight:bold; 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 div.item.filter input:focus { width:320px; transition:width 0.5s; }
body.mobile $output>div>div.list>div.title div.action div.item.filter input:focus { width:200px; transition:width 0.5s; }
body.width1 $output>div>div.list>div.title div.action div.item.filter input:focus { width:200px; transition:width 0.5s; }
$output>div>div.list>div.title div.action div.item.filter input { transition:width 0.8s; }
$output>div>div.list>div.title div.action { overflow:hidden; }
$output>div>div.list>div.title div.action div.item { margin-right:5px; }
@ -141,7 +142,7 @@ body.width1 $output img.qrcode { width:100%; margin:0; }
body.width1 div.input.float { position:absolute; top:0 !important; margin:0; width:100% !important; max-width:100% !important; }
body.width1 div.input.float input[name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
body.width1 fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
body:not(.width1) $output>fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
body:not(.mobile) $output>fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
body:not(.width1) $output div.item.card div.title div.action { display:none; }
body.en $output>fieldset table.content td:first-child { max-width:180px; width:unset;}
$fieldset { box-shadow:none; }

View File

@ -114,7 +114,7 @@ func (s Portal) List(m *ice.Message, arg ...string) {
s.Hash.List(m, kit.Slice(arg, 1)...).PushAction(mdb.DETAIL, s.Hash.Remove).Action().SortInt(mdb.ORDER)
return
}
if m.Option(model.USER_UID) == "" && m.IsTech() {
if m.Option(model.USER_UID) == "" {
if msg := m.Cmd(s.user, s.Table.Select, model.OPEN_ID, m.Option(ice.MSG_USERNAME)); msg.Length() == 0 {
msg := m.Cmd(s.user, s.Table.Create, m.Option(ice.MSG_USERNAME))
m.ProcessCookie(model.USER_UID, msg.Result())

View File

@ -112,7 +112,7 @@ Volcanos(chat.ONIMPORT, {
can.runAction({}, "noticeList", [value._uid], function(msg) {
if (msg.Length() == 0) { value._notice_hide = true; return can.onmotion.hidden(can, target) } can.onmotion.toggle(can, target, true)
can.page.Append(can, target, [
{text: " [ 通知公告 ] "}, {text: can.base.TimeTrim(msg.Append("created_at"))}, {text: " "}, {text: [msg.Append("title"), "", "title"]}, {text: "查看更多 >"},
{text: " [ 公告 ] "}, {text: can.base.TimeTrim(msg.Append("created_at"))}, {text: " "}, {text: [msg.Append("title"), "", "title"]}, {text: "更多 >"},
])
})
},
@ -174,7 +174,7 @@ Volcanos(chat.ONIMPORT, {
})
Volcanos(chat.ONACTION, {
beforeInputs: function(event, can, button, sub) {
can.user.isMobile && can._root.Inputs.appendChild(sub._target)
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)
sub.Option("city_name", "深圳市")
// sub.Option("city_name", "邹城市")

View File

@ -34,12 +34,15 @@ func (s user) Create(m *ice.Message, arg ...string) {
func (s user) Modify(m *ice.Message, arg ...string) {
s.Update(m, kit.Dict(m.OptionSimple(model.INFO)), model.UID, m.Option(model.USER_UID))
}
func (s user) Remove(m *ice.Message, arg ...string) {
s.Delete(m, m.OptionSimple(model.UID)...)
}
func (s user) List(m *ice.Message, arg ...string) {
if len(arg) == 0 {
if m.IsTech() {
s.Select(m, arg...).Table(func(value ice.Maps) {
if value[model.UID] != m.Option(model.USER_UID) {
m.PushButton(s.SetCookie)
m.PushButton(s.SetCookie, s.Remove)
} else {
m.PushButton()
}

View File

@ -6,6 +6,8 @@ GORM https://gorm.io/docs/indexes.html
`
field web.chat.wx.access
field web.chat.wx.menu
field web.team.gonganxitong.domain
field web.team.gonganxitong.user
field web.code.mysql.client
field web.code.mysql.query args `mysql gonganxitong`
field web.code.db.models