From 4cefaac89f5188cbb21052cd0fdb6a269a05c7fe Mon Sep 17 00:00:00 2001 From: shy Date: Thu, 19 Jun 2025 19:19:55 +0800 Subject: [PATCH] add some --- src/yingxiaotuiguang/common.go | 11 ++++++++++- src/yingxiaotuiguang/deal.go | 4 ++++ src/yingxiaotuiguang/publish.css | 3 ++- src/yingxiaotuiguang/publish.go | 1 + src/yingxiaotuiguang/publish.js | 1 + 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/yingxiaotuiguang/common.go b/src/yingxiaotuiguang/common.go index d2607ad..715ad52 100644 --- a/src/yingxiaotuiguang/common.go +++ b/src/yingxiaotuiguang/common.go @@ -14,6 +14,7 @@ type Table struct { guanlixitong.Table list string `name:"list promotion_uid uid auto" role:"void"` enter string `name:"enter" help:"进入系统" style:"notice" role:"void"` + open string `name:"open" style:"notice" role:"void"` productList string `name:"productList" role:"worker"` documentList string `name:"documentList" role:"worker"` feedbackList string `name:"feedbackList" role:"worker"` @@ -107,7 +108,15 @@ func (s Table) DealList(m *ice.Message, arg ...string) { m.RenameAppend(model.TO_USER_UID, model.USER_UID) } func (s Table) DocumentList(m *ice.Message, arg ...string) { - s.DocumentFields(m).OtherList(m, document{}) + if m.Option(model.PRODUCT_UID) == "" { + s.DocumentFields(m).OtherList(m, document{}) + } else { + s.DocumentFields(m).OtherList(m, document{}, m.OptionSimple(model.PRODUCT_UID)...) + } + m.PushAction(s.Open) +} +func (s Table) Open(m *ice.Message, arg ...string) { + m.ProcessOpen(m.Option(model.LINK)) } func (s Table) FeedbackList(m *ice.Message, arg ...string) { if s.FeedbackFields(m); s.IsLeader(m) { diff --git a/src/yingxiaotuiguang/deal.go b/src/yingxiaotuiguang/deal.go index d5393a6..066add9 100644 --- a/src/yingxiaotuiguang/deal.go +++ b/src/yingxiaotuiguang/deal.go @@ -20,6 +20,10 @@ func (s Deal) Create(m *ice.Message, arg ...string) { s.ValueCreate(m, arg...) s.TargetAddCount(m, bonus{}, model.BONUS_COUNT) } +func (s Deal) Remove(m *ice.Message, arg ...string) { + s.ValueRemove(m, arg...) + s.TargetAddCount(m, bonus{}, model.BONUS_COUNT) +} func (s Deal) List(m *ice.Message, arg ...string) { if s.DealFields(m); s.IsLeader(m) { s.ValueList(m, arg) diff --git a/src/yingxiaotuiguang/publish.css b/src/yingxiaotuiguang/publish.css index d9888c8..a45f22b 100644 --- a/src/yingxiaotuiguang/publish.css +++ b/src/yingxiaotuiguang/publish.css @@ -1 +1,2 @@ -$output div.info.action { display:flex; flex-direction:column; align-items:center; row-gap:10px; } \ No newline at end of file +$output div.info.action { display:flex; flex-direction:column; align-items:center; row-gap:10px; } +$output div.item.title.documentList { margin-top:60px; } \ No newline at end of file diff --git a/src/yingxiaotuiguang/publish.go b/src/yingxiaotuiguang/publish.go index 02f3f86..c1ab21d 100644 --- a/src/yingxiaotuiguang/publish.go +++ b/src/yingxiaotuiguang/publish.go @@ -16,6 +16,7 @@ func (s publish) List(m *ice.Message, arg ...string) { m.Cmdy(invite{}, arg).PushAction(s.Enter, s.Feedback).Display("").DisplayCSS("") s.EchoQRCodeIcon(m, s.Link(m, arg[0], m.PrefixKey(), arg[1]), m.Append(model.PRODUCT_ICON), kit.Select(m.Append(model.PRODUCT_NAME), m.Append(model.PRODUCT_TITLE), m.Append(model.TITLE))) + s.OtherListCmd(m, s.DocumentList) } func (s publish) Enter(m *ice.Message, arg ...string) { m.Cmdy(invite{}, m.ActionKey(), arg) diff --git a/src/yingxiaotuiguang/publish.js b/src/yingxiaotuiguang/publish.js index 8b9937c..2402408 100644 --- a/src/yingxiaotuiguang/publish.js +++ b/src/yingxiaotuiguang/publish.js @@ -6,5 +6,6 @@ Volcanos(chat.ONIMPORT, { can.page.Select(can, can._output, html.INPUT_BUTTON, function(target) { target.onclick = function(event) { can.run(can.request(event, value), [ctx.ACTION, target.name]) } }) + msg.Option("otherList") && can.onimport.otherList && can.onimport.otherList(can, msg, can.core.Split(msg.Option("otherList"))) }, }) \ No newline at end of file