mirror of
https://shylinux.com/x/community
synced 2025-07-01 21:21:19 +08:00
add some
This commit is contained in:
parent
42a481c658
commit
e26124f27e
@ -20,6 +20,7 @@ type allow struct {
|
|||||||
func (s allow) Create(m *ice.Message, arg ...string) {
|
func (s allow) Create(m *ice.Message, arg ...string) {
|
||||||
s.Insert(m.Spawn(), arg...)
|
s.Insert(m.Spawn(), arg...)
|
||||||
s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), "")
|
s.SendMessage(s.GetCommandUID(m), m.Option(model.FROM_USER_UID), "")
|
||||||
|
m.Info("what %v", m.FormatChain())
|
||||||
s.SendTemplate(m, "", "", m.Trans("please allow", "权限审批 请处理"))
|
s.SendTemplate(m, "", "", m.Trans("please allow", "权限审批 请处理"))
|
||||||
}
|
}
|
||||||
func (s allow) List(m *ice.Message, arg ...string) {
|
func (s allow) List(m *ice.Message, arg ...string) {
|
||||||
|
@ -87,13 +87,17 @@ func (s apply) Submit(m *ice.Message, arg ...string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Option(model.FROM_USER_UID, m.Option(model.USER_UID))
|
m.Option(model.FROM_USER_UID, m.Option(model.USER_UID))
|
||||||
m.Cmd(s.Prefix(m, allow{}), s.Create, model.APPLY_UID, m.Option(model.UID), model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)), msg.AppendSimple(model.USER_UID), model.STATUS, AllowCreate)
|
msg.Table(func(value ice.Maps) {
|
||||||
|
m.Option(model.TO_USER_UID, value[model.USER_UID])
|
||||||
|
m.Cmd(s.Prefix(m, allow{}), s.Create, model.APPLY_UID, m.Option(model.UID), model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)),
|
||||||
|
model.USER_UID, value[model.USER_UID], model.STATUS, AllowCreate)
|
||||||
|
})
|
||||||
s.RecordEvent(m, kit.JoinWord("🕑", m.Trans("apply submit", "权限申请 已提交"), kit.Cut(m.Option(model.UID), 6), s.TransRole(m, "", style), m.Option(model.USER_NAME)), m.Option(model.UID))
|
s.RecordEvent(m, kit.JoinWord("🕑", m.Trans("apply submit", "权限申请 已提交"), kit.Cut(m.Option(model.UID), 6), s.TransRole(m, "", style), m.Option(model.USER_NAME)), m.Option(model.UID))
|
||||||
s.SendMessage(m, msg.Append(model.USER_UID), m.Option(model.USER_UID))
|
s.SendMessage(m, msg.Append(model.USER_UID), m.Option(model.USER_UID))
|
||||||
}
|
}
|
||||||
func (s apply) Reject(m *ice.Message, arg ...string) {
|
func (s apply) Reject(m *ice.Message, arg ...string) {
|
||||||
msg := s.changeStatus(m, ApplySubmit, ApplyRejected)
|
msg := s.changeStatus(m, ApplySubmit, ApplyRejected)
|
||||||
s.SendTemplate(msg, "", "", m.Trans("apply rejected", "权限申请 已驳回"))
|
s.SendTemplate(msg, "", msg.Append(model.USER_UID), m.Trans("apply rejected", "权限申请 已驳回"))
|
||||||
m.Option(model.ROLE, msg.Append(model.ROLE))
|
m.Option(model.ROLE, msg.Append(model.ROLE))
|
||||||
}
|
}
|
||||||
func (s apply) Approve(m *ice.Message, arg ...string) {
|
func (s apply) Approve(m *ice.Message, arg ...string) {
|
||||||
@ -102,7 +106,7 @@ func (s apply) Approve(m *ice.Message, arg ...string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Cmd(s.UserPlace, s.Insert, s.Keys(s.Place, model.UID), msg.Append(model.PLACE_UID), msg.AppendSimple(model.USER_UID, model.ROLE))
|
m.Cmd(s.UserPlace, s.Insert, s.Keys(s.Place, model.UID), msg.Append(model.PLACE_UID), msg.AppendSimple(model.USER_UID, model.ROLE))
|
||||||
s.SendTemplate(msg, "", "", m.Trans("apply approved", "权限申请 已通过"))
|
s.SendTemplate(msg, "", msg.Append(model.USER_UID), m.Trans("apply approved", "权限申请 已通过"))
|
||||||
m.Option(model.ROLE, msg.Append(model.ROLE))
|
m.Option(model.ROLE, msg.Append(model.ROLE))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ type city struct {
|
|||||||
|
|
||||||
func (s user) Init(m *ice.Message, arg ...string) {
|
func (s user) Init(m *ice.Message, arg ...string) {
|
||||||
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
|
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
|
||||||
|
cmdSpace[m.PrefixKey()] = "20240724-community"
|
||||||
}
|
}
|
||||||
func (s street) Init(m *ice.Message, arg ...string) {
|
func (s street) Init(m *ice.Message, arg ...string) {
|
||||||
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
|
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
|
||||||
|
@ -251,7 +251,7 @@ func (s Table) SelectJoinCity(m *ice.Message, arg ...string) *ice.Message {
|
|||||||
}
|
}
|
||||||
func (s Table) SelectJoinUser(m *ice.Message, arg ...string) *ice.Message {
|
func (s Table) SelectJoinUser(m *ice.Message, arg ...string) *ice.Message {
|
||||||
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AVATAR) })
|
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AVATAR) })
|
||||||
if len(m.Appendv(model.USER_UID)) == 0 {
|
if kit.IndexOf(m.Appendv(ice.MSG_APPEND), model.USER_UID) == -1 {
|
||||||
return m
|
return m
|
||||||
}
|
}
|
||||||
return s.SelectJoin(m, user{}, arg...)
|
return s.SelectJoin(m, user{}, arg...)
|
||||||
@ -473,9 +473,11 @@ func (s Table) SpaceCmd(m *ice.Message, space string, arg ...ice.Any) *ice.Messa
|
|||||||
}
|
}
|
||||||
func (s Table) AutoCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
func (s Table) AutoCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||||
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
|
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
|
||||||
|
arg = append(arg, kit.Dict(ice.MSG_USERROLE, aaa.TECH))
|
||||||
return m.Cmdy(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
|
return m.Cmdy(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
|
||||||
}
|
}
|
||||||
func (s Table) AutoCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
func (s Table) AutoCmd(m *ice.Message, arg ...ice.Any) *ice.Message {
|
||||||
|
arg = append(arg, kit.Dict(ice.MSG_USERROLE, aaa.TECH))
|
||||||
return m.Cmd(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
|
return m.Cmd(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
|
||||||
}
|
}
|
||||||
func (s Table) SaveBack(m *ice.Message, arg ...string) func() {
|
func (s Table) SaveBack(m *ice.Message, arg ...string) func() {
|
||||||
@ -650,17 +652,26 @@ func (s Table) SendTemplate(m *ice.Message, from, to, title string, arg ...strin
|
|||||||
if m.IsErr() {
|
if m.IsErr() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Cmd(s.PrefixPortal(m), s.SendTemplate, m.PrefixKey(), from, to, title, arg)
|
if s.SettingSelect(m); m.Option(SETTING_WEIXIN_NOTICE) == "off" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
m.Option(model.UID, kit.Select(m.Option(model.UID), m.Result()))
|
||||||
|
m.Cmd(s.PrefixPortal(m), s.SendTemplate, m.PrefixKey(), from, to, kit.Select(kit.JoinWord(m.ActionCmdTitle(), m.Option(model.TITLE)), title), arg)
|
||||||
}
|
}
|
||||||
func (s Portal) SendTemplate(m *ice.Message, arg ...string) {
|
func (s Portal) SendTemplate(m *ice.Message, arg ...string) {
|
||||||
name := kit.Select("", arg, 4)
|
name := kit.Select("", arg, 4)
|
||||||
if name == "" {
|
if name == "" {
|
||||||
name = kit.JoinWord(m.Option(model.CITY_NAME), m.Option(model.STREET_NAME), kit.Select(m.Option(model.PLACE_NAME), m.Option(s.Keys(s.Place, model.NAME))))
|
// name = kit.JoinWord(m.Option(model.CITY_NAME), m.Option(model.STREET_NAME), kit.Select(m.Option(model.PLACE_NAME), m.Option(s.Keys(s.Place, model.NAME))))
|
||||||
|
name = kit.JoinWord(m.Option(model.STREET_NAME), kit.Select(m.Option(model.PLACE_NAME), m.Option(s.Keys(s.Place, model.NAME))))
|
||||||
}
|
}
|
||||||
uid, place_uid := kit.Select(m.Option(model.UID), arg, 5), kit.Select("", arg, 6)
|
uid, place_uid := kit.Select(m.Option(model.UID), arg, 5), kit.Select("", arg, 6)
|
||||||
kit.If(place_uid == "", func() { place_uid = m.Option(s.Keys(s.Place, model.UID)) })
|
kit.If(place_uid == "", func() { place_uid = m.Option(s.Keys(s.Place, model.UID)) })
|
||||||
link := m.Cmdx("", s.Link, place_uid, arg[0], uid)
|
link := m.Cmdx("", s.Link, place_uid, arg[0], uid)
|
||||||
s.AutoCmd(m, user{}, s.SendTemplate, arg[1], arg[2], link, kit.JoinWord(m.Option(model.PORTAL_NAME), arg[3]), name, kit.Cut(uid, 6))
|
s.AutoCmd(m, user{}, s.SendTemplate, arg[1], kit.Select(m.Option(model.TO_USER_UID), arg, 2), link,
|
||||||
|
// kit.JoinWord(m.Option(model.PORTAL_NAME), arg[3]),
|
||||||
|
// kit.JoinWord(m.Option(model.PORTAL_NAME),
|
||||||
|
arg[3], name, kit.Cut(uid, 6),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
func (s Table) ServiceList(m *ice.Message, arg ...string) *ice.Message {
|
func (s Table) ServiceList(m *ice.Message, arg ...string) *ice.Message {
|
||||||
return m.Cmd(s.PrefixService(m), arg)
|
return m.Cmd(s.PrefixService(m), arg)
|
||||||
|
@ -94,6 +94,7 @@ func (s member) List(m *ice.Message, arg ...string) {
|
|||||||
s.FieldsWithCreatedAT(m, s.UserPlace, s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS), USER_PLACE_ROLE, model.INFO, model.USER_UID).Limit(m, 300)
|
s.FieldsWithCreatedAT(m, s.UserPlace, s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS), USER_PLACE_ROLE, model.INFO, model.USER_UID).Limit(m, 300)
|
||||||
if len(arg) == 1 {
|
if len(arg) == 1 {
|
||||||
m.Cmdy(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), arg[0]).Action()
|
m.Cmdy(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), arg[0]).Action()
|
||||||
|
defer s.Place.RewriteAppend(m)
|
||||||
defer m.Sort(kit.Fields(model.MEMBER_STATUS, USER_PLACE_ROLE, model.AUTH_STATUS, model.CREATED_AT))
|
defer m.Sort(kit.Fields(model.MEMBER_STATUS, USER_PLACE_ROLE, model.AUTH_STATUS, model.CREATED_AT))
|
||||||
} else if len(arg) == 2 {
|
} else if len(arg) == 2 {
|
||||||
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), arg[0], s.Key(s.UserPlace, model.UID), arg[1]).Action()
|
m.FieldsSetDetail().Cmdy(s.UserPlace, s.Select, s.Keys(s.Place, model.UID), arg[0], s.Key(s.UserPlace, model.UID), arg[1]).Action()
|
||||||
|
@ -8,8 +8,8 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE),
|
can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE),
|
||||||
value.member_status != "normal" && can.onimport.textView(can, value, "member_status"),
|
value.member_status != "normal" && can.onimport.textView(can, value, "member_status"),
|
||||||
]},
|
]},
|
||||||
{view: html.STATUS, list: [value.info||value.auth_info||value.user_info]},
|
|
||||||
value.location && {view: html.STATUS, list: [value.location, value.system]},
|
value.location && {view: html.STATUS, list: [value.location, value.system]},
|
||||||
|
{view: html.STATUS, list: [value.info||value.auth_info||value.user_info]},
|
||||||
can.onimport.titleAction(can, value),
|
can.onimport.titleAction(can, value),
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
@ -23,6 +23,9 @@ type message struct {
|
|||||||
func (s message) Create(m *ice.Message, arg ...string) {
|
func (s message) Create(m *ice.Message, arg ...string) {
|
||||||
s.Insert(m, append(s.TransPrice(m, arg), m.OptionSimple(model.PLACE_UID, model.VALUE_UID, model.COMMAND_UID)...)...)
|
s.Insert(m, append(s.TransPrice(m, arg), m.OptionSimple(model.PLACE_UID, model.VALUE_UID, model.COMMAND_UID)...)...)
|
||||||
}
|
}
|
||||||
|
func (s message) Remove(m *ice.Message, arg ...string) {
|
||||||
|
s.Delete(m, kit.Simple(m.OptionSimple(model.UID), model.USER_UID, m.Option(ice.MSG_USERUID))...)
|
||||||
|
}
|
||||||
func (s message) List(m *ice.Message, arg ...string) {
|
func (s message) List(m *ice.Message, arg ...string) {
|
||||||
s.Tables(m, s.command, s.service).FieldsWithCreatedAT(m, s,
|
s.Tables(m, s.command, s.service).FieldsWithCreatedAT(m, s,
|
||||||
model.FROM_USER_UID, model.TITLE, model.CONTENT, model.PRICE, model.MESSAGE_STATUS, model.SCORE,
|
model.FROM_USER_UID, model.TITLE, model.CONTENT, model.PRICE, model.MESSAGE_STATUS, model.SCORE,
|
||||||
@ -46,6 +49,7 @@ func (s message) List(m *ice.Message, arg ...string) {
|
|||||||
switch MessageStatus(kit.Int(value[model.MESSAGE_STATUS])) {
|
switch MessageStatus(kit.Int(value[model.MESSAGE_STATUS])) {
|
||||||
case MessageCreate:
|
case MessageCreate:
|
||||||
button = append(button, s.Read)
|
button = append(button, s.Read)
|
||||||
|
button = append(button, s.Remove)
|
||||||
case MessageRead:
|
case MessageRead:
|
||||||
button = append(button, s.Done)
|
button = append(button, s.Done)
|
||||||
default:
|
default:
|
||||||
|
@ -15,6 +15,10 @@ $action div.item.text.filter i { padding-left:10px; }
|
|||||||
$action div.item.text.filter span { right:5px; }
|
$action div.item.text.filter span { right:5px; }
|
||||||
$action div.item.text.filter input { border-radius:20px; border:none; padding-left:32px; padding-right:32px; width:100%; }
|
$action div.item.text.filter input { border-radius:20px; border:none; padding-left:32px; padding-right:32px; width:100%; }
|
||||||
$action div.item.text.filter input:focus { border:var(--box-border); }
|
$action div.item.text.filter input:focus { border:var(--box-border); }
|
||||||
|
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; }
|
||||||
$output { background-color:var(--plugin-bg-color); }
|
$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 { 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.header img { height:100%; width:100%; object-fit:cover; }
|
||||||
|
@ -82,8 +82,10 @@ func (s Portal) Run(m *ice.Message, arg ...string) {
|
|||||||
s.DisplayBase(m, "common.js")
|
s.DisplayBase(m, "common.js")
|
||||||
m.Option(model.SERVICE_UID, ServiceUID(m))
|
m.Option(model.SERVICE_UID, ServiceUID(m))
|
||||||
m.Option(model.COMMAND_UID, CommandUID(m, arg[0]))
|
m.Option(model.COMMAND_UID, CommandUID(m, arg[0]))
|
||||||
m.OptionDefault(model.USER_UID, m.Option(ice.MSG_USERUID))
|
m.OptionDefault(model.TO_USER_UID, m.Option(model.USER_UID))
|
||||||
m.OptionDefault(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
defer m.Optionv(model.TO_USER_UID, []string{})
|
||||||
|
m.Option(model.USER_UID, m.Option(ice.MSG_USERUID))
|
||||||
|
m.Option(model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
|
||||||
m.Search(arg[0], func(key string, cmd *ice.Command) {
|
m.Search(arg[0], func(key string, cmd *ice.Command) {
|
||||||
role := cmd.Role
|
role := cmd.Role
|
||||||
if len(arg) > 1 && arg[1] == ctx.ACTION {
|
if len(arg) > 1 && arg[1] == ctx.ACTION {
|
||||||
|
@ -40,6 +40,11 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
if (can.db.hash.length == 1 && can.db.hash[0].length != 32) { can.db.hash = [can.Option(can.core.Item(can.Option())[0]), can.db.hash[0]] }
|
if (can.db.hash.length == 1 && can.db.hash[0].length != 32) { can.db.hash = [can.Option(can.core.Item(can.Option())[0]), can.db.hash[0]] }
|
||||||
if (can.db.hash.length > 1 && can.db.hash[1] && can.db.hash[1] != can.ConfIndex()) {
|
if (can.db.hash.length > 1 && can.db.hash[1] && can.db.hash[1] != can.ConfIndex()) {
|
||||||
can.sup.current = can.onimport.myTrans(can, kit.Dict(msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME)))
|
can.sup.current = can.onimport.myTrans(can, kit.Dict(msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME)))
|
||||||
|
msg.Table(function(value) {
|
||||||
|
if (value[PLACE_UID] == can.db.hash[0]) {
|
||||||
|
can.sup.current = can.onimport.myTrans(can, value)
|
||||||
|
}
|
||||||
|
})
|
||||||
return can.runAction({}, ctx.COMMAND, [can.db.hash[1]], function(msg) { msg.Table(function(value) {
|
return can.runAction({}, ctx.COMMAND, [can.db.hash[1]], function(msg) { msg.Table(function(value) {
|
||||||
value.args = [can.db.hash[0]].concat(can.db.hash.slice(2)), can.onimport.myStory(can, value)
|
value.args = [can.db.hash[0]].concat(can.db.hash.slice(2)), can.onimport.myStory(can, value)
|
||||||
}) })
|
}) })
|
||||||
|
@ -15,7 +15,7 @@ type sess struct {
|
|||||||
fields string `data:"user_uid,agent,system,location,ip,ua"`
|
fields string `data:"user_uid,agent,system,location,ip,ua"`
|
||||||
create string `name:"create user_uid*"`
|
create string `name:"create user_uid*"`
|
||||||
check string `name:"check" role:"void"`
|
check string `name:"check" role:"void"`
|
||||||
list string `name:"list uid auto" role:"tech"`
|
list string `name:"list uid auto" role:"void"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s sess) Create(m *ice.Message, arg ...string) {
|
func (s sess) Create(m *ice.Message, arg ...string) {
|
||||||
|
@ -16,7 +16,7 @@ type setting struct {
|
|||||||
order string `data:"103"`
|
order string `data:"103"`
|
||||||
role string `data:"leader,worker,server"`
|
role string `data:"leader,worker,server"`
|
||||||
short string `data:"name"`
|
short string `data:"name"`
|
||||||
field string `data:"name,type,help,role,order"`
|
field string `data:"name,type,help,role,order,default"`
|
||||||
fields string `data:"name,value,user_uid"`
|
fields string `data:"name,value,user_uid"`
|
||||||
create string `name:"create name* type* help"`
|
create string `name:"create name* type* help"`
|
||||||
update string `name:"update" role:"void"`
|
update string `name:"update" role:"void"`
|
||||||
@ -25,6 +25,7 @@ type setting struct {
|
|||||||
func (s setting) Init(m *ice.Message, arg ...string) {
|
func (s setting) Init(m *ice.Message, arg ...string) {
|
||||||
s.Table.Init(m, arg...)
|
s.Table.Init(m, arg...)
|
||||||
s.Create(m, model.NAME, SETTING_PROFILE, model.TYPE, SETTING_RADIO, model.ORDER, "1")
|
s.Create(m, model.NAME, SETTING_PROFILE, model.TYPE, SETTING_RADIO, model.ORDER, "1")
|
||||||
|
s.Create(m, model.NAME, SETTING_WEIXIN_NOTICE, model.TYPE, SETTING_RADIO, model.HELP, "微信接受系统消息通知", model.ORDER, "2", "default", "on")
|
||||||
}
|
}
|
||||||
func (s setting) Create(m *ice.Message, arg ...string) {
|
func (s setting) Create(m *ice.Message, arg ...string) {
|
||||||
s.Hash.Create(m, arg...)
|
s.Hash.Create(m, arg...)
|
||||||
@ -79,7 +80,7 @@ func (s setting) List(m *ice.Message, arg ...string) {
|
|||||||
m.Push(model.TYPE, value[model.TYPE])
|
m.Push(model.TYPE, value[model.TYPE])
|
||||||
m.Push(model.HELP, value[model.HELP])
|
m.Push(model.HELP, value[model.HELP])
|
||||||
m.Push(model.ORDER, value[model.ORDER])
|
m.Push(model.ORDER, value[model.ORDER])
|
||||||
m.Push(model.VALUE, data[value[model.NAME]])
|
m.Push(model.VALUE, kit.Select(value["default"], data[value[model.NAME]]))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if msg := m.Cmd(s.Place, s.Select, model.UID, m.Option(model.PLACE_UID)); msg.Append(model.AUTH_UID) != "" {
|
if msg := m.Cmd(s.Place, s.Select, model.UID, m.Option(model.PLACE_UID)); msg.Append(model.AUTH_UID) != "" {
|
||||||
@ -124,6 +125,7 @@ func (s Table) SettingSelect(m *ice.Message, arg ...string) {
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
SETTING_PROFILE = "profile"
|
SETTING_PROFILE = "profile"
|
||||||
|
SETTING_WEIXIN_NOTICE = "setting_weixin_notice"
|
||||||
SETTING_RADIO = "radio"
|
SETTING_RADIO = "radio"
|
||||||
SETTING_STORY = "story"
|
SETTING_STORY = "story"
|
||||||
)
|
)
|
||||||
|
@ -7,6 +7,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
sessionStorage.length && can.onimport._plugin(can, {index: "can.sessionStorage"})
|
sessionStorage.length && can.onimport._plugin(can, {index: "can.sessionStorage"})
|
||||||
localStorage.length && can.onimport._plugin(can, {index: "can.localStorage"})
|
localStorage.length && can.onimport._plugin(can, {index: "can.localStorage"})
|
||||||
can.user.isTechOrRoot(can) && can.onimport._plugin(can, {index: "can.cookie"})
|
can.user.isTechOrRoot(can) && can.onimport._plugin(can, {index: "can.cookie"})
|
||||||
|
can.onimport._plugin(can, {index: "can.runtime"})
|
||||||
},
|
},
|
||||||
_plugin: function(can, value) { value.width = can.ConfWidth()-20
|
_plugin: function(can, value) { value.width = can.ConfWidth()-20
|
||||||
can.onappend.plugin(can, value, function(sub) {
|
can.onappend.plugin(can, value, function(sub) {
|
||||||
|
@ -20,11 +20,11 @@ type user struct {
|
|||||||
setting setting
|
setting setting
|
||||||
order string `data:"509"`
|
order string `data:"509"`
|
||||||
role string `data:"tech"`
|
role string `data:"tech"`
|
||||||
template string `data:"4b-Z_r8dZmm1pHdd2h4A10VVYX4OIHvemlLjsHKBj2s"`
|
template string `data:"zJjgEbfiVKgJ_eDLfvHB_lXEzitNuxwZk0UHeTsFRns"`
|
||||||
fields string `data:"auth_uid,language,name,info,avatar,background"`
|
fields string `data:"auth_uid,open_id,language,name,info,avatar,background"`
|
||||||
create string `name:"create open_id* avatar usernick"`
|
create string `name:"create open_id* avatar usernick"`
|
||||||
modify string `name:"modify info" role:"void"`
|
modify string `name:"modify info" role:"void"`
|
||||||
list string `name:"list uid auto" role:"tech"`
|
list string `name:"list uid auto" role:"void"`
|
||||||
setCookie string `name:"setCookie" help:"切换"`
|
setCookie string `name:"setCookie" help:"切换"`
|
||||||
sendCookie string `name:"sendCookie" help:"授权" role:"void"`
|
sendCookie string `name:"sendCookie" help:"授权" role:"void"`
|
||||||
authRemove string `name:"authRemove" help:"删除认证" role:"void"`
|
authRemove string `name:"authRemove" help:"删除认证" role:"void"`
|
||||||
@ -113,11 +113,12 @@ func (s user) SendCookie(m *ice.Message, arg ...string) {
|
|||||||
m.Cmd(web.SPACE, m.Option(ice.FROM_DAEMON), "cookie", m.Option(ice.MSG_USERUID), ice.MSG_USERUID)
|
m.Cmd(web.SPACE, m.Option(ice.FROM_DAEMON), "cookie", m.Option(ice.MSG_USERUID), ice.MSG_USERUID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
func (s user) SendTemplate(m *ice.Message, arg ...string) { // from uid url type name hash
|
func (s user) SendTemplate(m *ice.Message, arg ...string) { // from uid url type name hash time
|
||||||
msg := s.Select(m, model.UID, kit.Select(m.Option(model.USER_UID), arg, 1))
|
msg := s.Select(m, model.UID, kit.Select(m.Option(ice.MSG_USERUID), arg, 1))
|
||||||
m.Cmdy("web.chat.wx.template", "", m.Config(nfs.TEMPLATE), msg.Append(model.OPEN_ID), kit.Select("", arg, 2),
|
m.Cmdy("web.chat.wx.template", "", m.Config(nfs.TEMPLATE), msg.Append(model.OPEN_ID), kit.Select("", arg, 2),
|
||||||
"thing7", kit.Select("", arg, 3), "thing12", kit.Select("", arg, 4), "character_string2", kit.Cut(kit.Select("", arg, 5), 6),
|
"thing7", kit.Select("", arg, 3), "thing12", kit.Select("", arg, 4), "character_string2", kit.Cut(kit.Select("", arg, 5), 6),
|
||||||
"time11", time.Now().Format("2006年01月02日 15:04"), "thing18", kit.Select(kit.Select(m.Option(ice.MSG_USERNAME), m.Option(ice.MSG_USERNICK)), arg, 0),
|
"thing18", kit.Select(kit.Select(m.Option(ice.MSG_USERNAME), m.Option(ice.MSG_USERNICK)), arg, 0),
|
||||||
|
"time11", time.Now().Format("2006年01月02日 15:04"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
func (s user) Email(m *ice.Message, arg ...string) {
|
func (s user) Email(m *ice.Message, arg ...string) {
|
||||||
|
@ -19,13 +19,16 @@ type transition struct {
|
|||||||
|
|
||||||
func (s transition) List(m *ice.Message, arg ...string) {
|
func (s transition) List(m *ice.Message, arg ...string) {
|
||||||
s.ValueList(m, arg).Display("")
|
s.ValueList(m, arg).Display("")
|
||||||
m.PushAction(s.TestMessage, s.TestMarket)
|
m.PushAction(s.TestMessage, s.TestMarket, s.TestTemplate)
|
||||||
|
}
|
||||||
|
func (s transition) TestMarket(m *ice.Message, arg ...string) {
|
||||||
|
s.MarketInsert(m, arg...)
|
||||||
}
|
}
|
||||||
func (s transition) TestMessage(m *ice.Message, arg ...string) {
|
func (s transition) TestMessage(m *ice.Message, arg ...string) {
|
||||||
s.SendMessage(m, m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID), arg...)
|
s.SendMessage(m, m.Option(model.FROM_USER_UID), m.Option(model.TO_USER_UID), arg...)
|
||||||
}
|
}
|
||||||
func (s transition) TestMarket(m *ice.Message, arg ...string) {
|
func (s transition) TestTemplate(m *ice.Message, arg ...string) {
|
||||||
s.MarketInsert(m, arg...)
|
s.SendTemplate(m, "", m.Option(model.TO_USER_UID), m.Option(model.TITLE))
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { ice.TeamCtxCmd(transition{}) }
|
func init() { ice.TeamCtxCmd(transition{}) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user