This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-09-25 17:16:07 +08:00
parent 06dc76e5fc
commit 0e92b106a4
17 changed files with 164 additions and 324 deletions

View File

@ -1,274 +0,0 @@
package api
var Trans = map[string]string{
"web.team.gonganxitong.portal": "20240724-community",
"web.team.gonganxitong.allow": "20240724-community",
"web.team.gonganxitong.apply": "20240724-community",
"web.team.gonganxitong.domain": "20240724-community",
"web.team.gonganxitong.email": "20240724-community",
"web.team.gonganxitong.event": "20240724-community",
"web.team.gonganxitong.market": "20240724-community",
"web.team.gonganxitong.member": "20240724-community",
"web.team.gonganxitong.message": "20240724-community",
"web.team.gonganxitong.notice": "20240724-community",
"web.team.gonganxitong.qrcode": "20240724-community",
"web.team.gonganxitong.recent": "20240724-community",
"web.team.gonganxitong.service": "20240724-community",
"web.team.gonganxitong.setting": "20240724-community",
"web.team.gonganxitong.support": "20240724-community",
"web.team.huodongzuzhi.activity": "20240724-community",
"web.team.huodongzuzhi.portal": "20240724-community",
"web.team.huodongzuzhi.allow": "20240724-community",
"web.team.huodongzuzhi.apply": "20240724-community",
"web.team.huodongzuzhi.event": "20240724-community",
"web.team.huodongzuzhi.market": "20240724-community",
"web.team.huodongzuzhi.member": "20240724-community",
"web.team.huodongzuzhi.message": "20240724-community",
"web.team.huodongzuzhi.notice": "20240724-community",
"web.team.huodongzuzhi.qrcode": "20240724-community",
"web.team.huodongzuzhi.recent": "20240724-community",
"web.team.huodongzuzhi.service": "20240724-community",
"web.team.huodongzuzhi.setting": "20240724-community",
"web.team.huodongzuzhi.support": "20240724-community",
"web.team.renzhengshouquan.portal": "20240724-community",
"web.team.renzhengshouquan.allow": "20240724-community",
"web.team.renzhengshouquan.apply": "20240724-community",
"web.team.renzhengshouquan.auth": "20240724-community",
"web.team.renzhengshouquan.cert": "20240724-community",
"web.team.renzhengshouquan.domain": "20240724-community",
"web.team.renzhengshouquan.event": "20240724-community",
"web.team.renzhengshouquan.market": "20240724-community",
"web.team.renzhengshouquan.member": "20240724-community",
"web.team.renzhengshouquan.message": "20240724-community",
"web.team.renzhengshouquan.notice": "20240724-community",
"web.team.renzhengshouquan.profile": "20240724-community",
"web.team.renzhengshouquan.qrcode": "20240724-community",
"web.team.renzhengshouquan.recent": "20240724-community",
"web.team.renzhengshouquan.service": "20240724-community",
"web.team.renzhengshouquan.setting": "20240724-community",
"web.team.renzhengshouquan.support": "20240724-community",
"web.team.yuehaoxitong.portal": "20240724-community",
"web.team.yuehaoxitong.allow": "20240724-community",
"web.team.yuehaoxitong.apply": "20240724-community",
"web.team.yuehaoxitong.call": "20240724-community",
"web.team.yuehaoxitong.event": "20240724-community",
"web.team.yuehaoxitong.history": "20240724-community",
"web.team.yuehaoxitong.market": "20240724-community",
"web.team.yuehaoxitong.member": "20240724-community",
"web.team.yuehaoxitong.message": "20240724-community",
"web.team.yuehaoxitong.notice": "20240724-community",
"web.team.yuehaoxitong.open": "20240724-community",
"web.team.yuehaoxitong.plan": "20240724-community",
"web.team.yuehaoxitong.qrcode": "20240724-community",
"web.team.yuehaoxitong.recent": "20240724-community",
"web.team.yuehaoxitong.reception": "20240724-community",
"web.team.yuehaoxitong.schedule": "20240724-community",
"web.team.yuehaoxitong.service": "20240724-community",
"web.team.yuehaoxitong.setting": "20240724-community",
"web.team.yuehaoxitong.support": "20240724-community",
"web.team.yuehaoxitong.take": "20240724-community",
"web.team.yuehaoxitong.volume": "20240724-community",
"web.team.jiaocaiziliao.portal": "20240724-education",
"web.team.jiaocaiziliao.allow": "20240724-education",
"web.team.jiaocaiziliao.apply": "20240724-education",
"web.team.jiaocaiziliao.document": "20240724-education",
"web.team.jiaocaiziliao.event": "20240724-education",
"web.team.jiaocaiziliao.market": "20240724-education",
"web.team.jiaocaiziliao.member": "20240724-education",
"web.team.jiaocaiziliao.message": "20240724-education",
"web.team.jiaocaiziliao.notice": "20240724-education",
"web.team.jiaocaiziliao.official": "20240724-education",
"web.team.jiaocaiziliao.qrcode": "20240724-education",
"web.team.jiaocaiziliao.recent": "20240724-education",
"web.team.jiaocaiziliao.service": "20240724-education",
"web.team.jiaocaiziliao.setting": "20240724-education",
"web.team.jiaocaiziliao.support": "20240724-education",
"web.team.jiaowuxitong.portal": "20240724-education",
"web.team.jiaowuxitong.allow": "20240724-education",
"web.team.jiaowuxitong.apply": "20240724-education",
"web.team.jiaowuxitong.event": "20240724-education",
"web.team.jiaowuxitong.homework": "20240724-education",
"web.team.jiaowuxitong.market": "20240724-education",
"web.team.jiaowuxitong.member": "20240724-education",
"web.team.jiaowuxitong.message": "20240724-education",
"web.team.jiaowuxitong.notice": "20240724-education",
"web.team.jiaowuxitong.qrcode": "20240724-education",
"web.team.jiaowuxitong.recent": "20240724-education",
"web.team.jiaowuxitong.service": "20240724-education",
"web.team.jiaowuxitong.setting": "20240724-education",
"web.team.jiaowuxitong.support": "20240724-education",
"web.team.kaoshixitong.portal": "20240724-education",
"web.team.kaoshixitong.allow": "20240724-education",
"web.team.kaoshixitong.apply": "20240724-education",
"web.team.kaoshixitong.event": "20240724-education",
"web.team.kaoshixitong.market": "20240724-education",
"web.team.kaoshixitong.member": "20240724-education",
"web.team.kaoshixitong.message": "20240724-education",
"web.team.kaoshixitong.notice": "20240724-education",
"web.team.kaoshixitong.qrcode": "20240724-education",
"web.team.kaoshixitong.question": "20240724-education",
"web.team.kaoshixitong.recent": "20240724-education",
"web.team.kaoshixitong.service": "20240724-education",
"web.team.kaoshixitong.setting": "20240724-education",
"web.team.kaoshixitong.support": "20240724-education",
"web.team.zaixianketang.portal": "20240724-education",
"web.team.zaixianketang.allow": "20240724-education",
"web.team.zaixianketang.apply": "20240724-education",
"web.team.zaixianketang.event": "20240724-education",
"web.team.zaixianketang.lesson": "20240724-education",
"web.team.zaixianketang.market": "20240724-education",
"web.team.zaixianketang.member": "20240724-education",
"web.team.zaixianketang.message": "20240724-education",
"web.team.zaixianketang.notice": "20240724-education",
"web.team.zaixianketang.qrcode": "20240724-education",
"web.team.zaixianketang.recent": "20240724-education",
"web.team.zaixianketang.service": "20240724-education",
"web.team.zaixianketang.setting": "20240724-education",
"web.team.zaixianketang.support": "20240724-education",
"web.team.gongyinglian.portal": "20240724-enterprise",
"web.team.gongyinglian.allow": "20240724-enterprise",
"web.team.gongyinglian.apply": "20240724-enterprise",
"web.team.gongyinglian.brand": "20240724-enterprise",
"web.team.gongyinglian.event": "20240724-enterprise",
"web.team.gongyinglian.expense": "20240724-enterprise",
"web.team.gongyinglian.express": "20240724-enterprise",
"web.team.gongyinglian.goods": "20240724-enterprise",
"web.team.gongyinglian.loan": "20240724-enterprise",
"web.team.gongyinglian.market": "20240724-enterprise",
"web.team.gongyinglian.material": "20240724-enterprise",
"web.team.gongyinglian.member": "20240724-enterprise",
"web.team.gongyinglian.message": "20240724-enterprise",
"web.team.gongyinglian.notice": "20240724-enterprise",
"web.team.gongyinglian.order": "20240724-enterprise",
"web.team.gongyinglian.payment": "20240724-enterprise",
"web.team.gongyinglian.produce": "20240724-enterprise",
"web.team.gongyinglian.product": "20240724-enterprise",
"web.team.gongyinglian.purchase": "20240724-enterprise",
"web.team.gongyinglian.qrcode": "20240724-enterprise",
"web.team.gongyinglian.quality": "20240724-enterprise",
"web.team.gongyinglian.recent": "20240724-enterprise",
"web.team.gongyinglian.refund": "20240724-enterprise",
"web.team.gongyinglian.return": "20240724-enterprise",
"web.team.gongyinglian.sell": "20240724-enterprise",
"web.team.gongyinglian.service": "20240724-enterprise",
"web.team.gongyinglian.setting": "20240724-enterprise",
"web.team.gongyinglian.shop": "20240724-enterprise",
"web.team.gongyinglian.support": "20240724-enterprise",
"web.team.gongyinglian.warehouse": "20240724-enterprise",
"web.team.guanlixitong.portal": "20240724-enterprise",
"web.team.guanlixitong.allow": "20240724-enterprise",
"web.team.guanlixitong.apply": "20240724-enterprise",
"web.team.guanlixitong.event": "20240724-enterprise",
"web.team.guanlixitong.market": "20240724-enterprise",
"web.team.guanlixitong.member": "20240724-enterprise",
"web.team.guanlixitong.message": "20240724-enterprise",
"web.team.guanlixitong.notice": "20240724-enterprise",
"web.team.guanlixitong.qrcode": "20240724-enterprise",
"web.team.guanlixitong.recent": "20240724-enterprise",
"web.team.guanlixitong.service": "20240724-enterprise",
"web.team.guanlixitong.setting": "20240724-enterprise",
"web.team.guanlixitong.support": "20240724-enterprise",
"web.team.guanlixitong.target": "20240724-enterprise",
"web.team.shichangyingxiao.portal": "20240724-enterprise",
"web.team.shichangyingxiao.allow": "20240724-enterprise",
"web.team.shichangyingxiao.apply": "20240724-enterprise",
"web.team.shichangyingxiao.event": "20240724-enterprise",
"web.team.shichangyingxiao.market": "20240724-enterprise",
"web.team.shichangyingxiao.member": "20240724-enterprise",
"web.team.shichangyingxiao.message": "20240724-enterprise",
"web.team.shichangyingxiao.notice": "20240724-enterprise",
"web.team.shichangyingxiao.promotion": "20240724-enterprise",
"web.team.shichangyingxiao.qrcode": "20240724-enterprise",
"web.team.shichangyingxiao.recent": "20240724-enterprise",
"web.team.shichangyingxiao.service": "20240724-enterprise",
"web.team.shichangyingxiao.setting": "20240724-enterprise",
"web.team.shichangyingxiao.support": "20240724-enterprise",
"web.team.zijinlian.portal": "20240724-enterprise",
"web.team.zijinlian.allow": "20240724-enterprise",
"web.team.zijinlian.apply": "20240724-enterprise",
"web.team.zijinlian.event": "20240724-enterprise",
"web.team.zijinlian.investment": "20240724-enterprise",
"web.team.zijinlian.market": "20240724-enterprise",
"web.team.zijinlian.member": "20240724-enterprise",
"web.team.zijinlian.message": "20240724-enterprise",
"web.team.zijinlian.notice": "20240724-enterprise",
"web.team.zijinlian.qrcode": "20240724-enterprise",
"web.team.zijinlian.recent": "20240724-enterprise",
"web.team.zijinlian.service": "20240724-enterprise",
"web.team.zijinlian.setting": "20240724-enterprise",
"web.team.zijinlian.support": "20240724-enterprise",
"web.team.dashboard.portal": "20240903-operation",
"web.team.dashboard.allow": "20240903-operation",
"web.team.dashboard.apply": "20240903-operation",
"web.team.dashboard.dashboard": "20240903-operation",
"web.team.dashboard.event": "20240903-operation",
"web.team.dashboard.market": "20240903-operation",
"web.team.dashboard.member": "20240903-operation",
"web.team.dashboard.message": "20240903-operation",
"web.team.dashboard.notice": "20240903-operation",
"web.team.dashboard.qrcode": "20240903-operation",
"web.team.dashboard.recent": "20240903-operation",
"web.team.dashboard.service": "20240903-operation",
"web.team.dashboard.setting": "20240903-operation",
"web.team.dashboard.summary": "20240903-operation",
"web.team.dashboard.support": "20240903-operation",
"web.team.development.portal": "20240903-operation",
"web.team.development.allow": "20240903-operation",
"web.team.development.apply": "20240903-operation",
"web.team.development.event": "20240903-operation",
"web.team.development.market": "20240903-operation",
"web.team.development.member": "20240903-operation",
"web.team.development.message": "20240903-operation",
"web.team.development.notice": "20240903-operation",
"web.team.development.qrcode": "20240903-operation",
"web.team.development.recent": "20240903-operation",
"web.team.development.service": "20240903-operation",
"web.team.development.setting": "20240903-operation",
"web.team.development.support": "20240903-operation",
"web.team.development.version": "20240903-operation",
"web.team.operation.portal": "20240903-operation",
"web.team.operation.allow": "20240903-operation",
"web.team.operation.apply": "20240903-operation",
"web.team.operation.event": "20240903-operation",
"web.team.operation.market": "20240903-operation",
"web.team.operation.member": "20240903-operation",
"web.team.operation.message": "20240903-operation",
"web.team.operation.notice": "20240903-operation",
"web.team.operation.qrcode": "20240903-operation",
"web.team.operation.recent": "20240903-operation",
"web.team.operation.release": "20240903-operation",
"web.team.operation.service": "20240903-operation",
"web.team.operation.setting": "20240903-operation",
"web.team.operation.support": "20240903-operation",
"web.team.production.portal": "20240903-operation",
"web.team.production.allow": "20240903-operation",
"web.team.production.apply": "20240903-operation",
"web.team.production.case": "20240903-operation",
"web.team.production.event": "20240903-operation",
"web.team.production.issue": "20240903-operation",
"web.team.production.market": "20240903-operation",
"web.team.production.member": "20240903-operation",
"web.team.production.message": "20240903-operation",
"web.team.production.notice": "20240903-operation",
"web.team.production.plan": "20240903-operation",
"web.team.production.qrcode": "20240903-operation",
"web.team.production.recent": "20240903-operation",
"web.team.production.service": "20240903-operation",
"web.team.production.setting": "20240903-operation",
"web.team.production.support": "20240903-operation",
"web.team.production.task": "20240903-operation",
"web.team.storage.portal": "20240903-operation",
"web.team.storage.allow": "20240903-operation",
"web.team.storage.apply": "20240903-operation",
"web.team.storage.event": "20240903-operation",
"web.team.storage.file": "20240903-operation",
"web.team.storage.market": "20240903-operation",
"web.team.storage.member": "20240903-operation",
"web.team.storage.message": "20240903-operation",
"web.team.storage.notice": "20240903-operation",
"web.team.storage.qrcode": "20240903-operation",
"web.team.storage.recent": "20240903-operation",
"web.team.storage.service": "20240903-operation",
"web.team.storage.setting": "20240903-operation",
"web.team.storage.support": "20240903-operation",
}

View File

@ -3,6 +3,7 @@ package gonganxitong
import (
"shylinux.com/x/ice"
"shylinux.com/x/community/src/api"
"shylinux.com/x/community/src/gonganxitong/model"
)
@ -12,6 +13,15 @@ type city struct {
authCreate string `name:"authCreate city_name* city_info company_name*" role:"tech"`
}
func (s city) Init(m *ice.Message, arg ...string) {
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
}
func (s user) Init(m *ice.Message, arg ...string) {
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
}
func (s street) Init(m *ice.Message, arg ...string) {
cmdPortal[m.PrefixKey()] = api.GONGANXITONG_PORTAL
}
func (s city) FindOrCreateByName(m *ice.Message, arg ...string) {
if msg := m.Cmd(s, s.Select, model.NAME, arg[1]); msg.Length() == 0 {
msg := m.Cmd(s, s.Insert, model.NAME, arg[1])

View File

@ -14,7 +14,8 @@ import (
type command struct {
Table
modify string `name:"modify service_uid icon name index"`
service service
modify string `name:"modify service_uid icon name index"`
}
func (s command) Modify(m *ice.Message, arg ...string) {
@ -26,14 +27,16 @@ func (s command) Modify(m *ice.Message, arg ...string) {
m.SetResult().Echo(uid)
}
func (s command) Autogen(m *ice.Message, arg ...string) {
list := map[string][]string{}
space := map[string][]string{}
portal := map[string][]string{}
s.List(m).Table(func(value ice.Maps) {
if strings.HasSuffix(value[model.INDEX], ".allow") {
list[value[model.SPACE]] = append(list[value[model.SPACE]], strings.ReplaceAll(value[model.INDEX], ".allow", ".portal"))
space[value[model.SPACE]] = append(space[value[model.SPACE]], strings.ReplaceAll(value[model.INDEX], ".allow", ".portal"))
}
list[value[model.SPACE]] = append(list[value[model.SPACE]], value[model.INDEX])
space[value[model.SPACE]] = append(space[value[model.SPACE]], value[model.INDEX])
portal[value["portal"]] = append(portal[value["portal"]], value[model.INDEX])
})
for p, v := range list {
for p, v := range space {
nfs.Create(m.Message, "src/api/"+p+".go", func(w io.Writer) {
fmt.Fprintf(w, "package api\n\n")
for _, v := range v {
@ -41,10 +44,21 @@ func (s command) Autogen(m *ice.Message, arg ...string) {
}
})
}
return
nfs.Create(m.Message, "src/api/space.go", func(w io.Writer) {
fmt.Fprintf(w, "package api\n\n")
fmt.Fprintf(w, "var Trans = map[string]string{\n")
for p, v := range list {
fmt.Fprintf(w, "var Space = map[string]string{\n")
for p, v := range space {
for _, v := range v {
fmt.Fprintf(w, "\"%s\": \"%s\",\n", v, p)
}
}
fmt.Fprintf(w, "}\n")
})
nfs.Create(m.Message, "src/api/portal.go", func(w io.Writer) {
fmt.Fprintf(w, "package api\n\n")
fmt.Fprintf(w, "var Portal = map[string]string{\n")
for p, v := range portal {
for _, v := range v {
fmt.Fprintf(w, "\"%s\": \"%s\",\n", v, p)
}
@ -52,12 +66,26 @@ func (s command) Autogen(m *ice.Message, arg ...string) {
fmt.Fprintf(w, "}\n")
})
}
func (s command) Cache(m *ice.Message, arg ...string) *ice.Message {
kit.For(cmdPortal, func(k, v string) {
m.Push(model.SPACE, cmdSpace[k])
m.Push(model.PORTAL, v)
m.Push(model.INDEX, k)
})
m.Sort("space,portal,index")
return m
}
func (s command) List(m *ice.Message, arg ...string) *ice.Message {
s.Tables(m, service{}).Fields(m,
s.Key(s, model.UPDATED_AT), s.Key(s, model.INDEX), s.AS(model.NODENAME, model.SPACE),
s.Tables(m, s.service).Fields(m,
s.Key(s, model.UPDATED_AT), s.Key(s, model.INDEX),
s.AS(s.Key(s.service, model.INDEX), "portal"),
s.AS(model.NODENAME, model.SPACE),
).Orders(m, "`space`,`index`").Limit(m, 300)
s.Select(m).Action(s.Autogen)
s.Select(m).Action(s.Autogen, s.Cache)
return m
}
var cmdPortal = map[string]string{}
var cmdSpace = map[string]string{}
func init() { ice.TeamCtxCmd(command{}) }

View File

@ -72,7 +72,7 @@ func (s Table) Inputs(m *ice.Message, arg ...string) {
case model.PLACE_TYPE:
s.InputsList(m, PlaceTypeList, arg...)
case model.DOMAIN_UID:
m.Cmdy(s.FindSpaceCmd(m, api.GONGANXITONG_DOMAIN)).DisplayInputKeyNameIconTitle()
s.AutoCmdy(m, api.GONGANXITONG_DOMAIN).DisplayInputKeyNameIconTitle()
default:
s.Table.Inputs(m, arg...)
}
@ -172,9 +172,14 @@ func (s Table) SelectJoinCity(m *ice.Message, arg ...string) *ice.Message {
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME) })
return s.SelectJoin(m, city{}, arg...)
}
func (s Table) SelectJoinAuth(m *ice.Message) *ice.Message {
defer m.Options(ice.MSG_USERROLE, aaa.VOID)
return s.SelectJoin(m, s.FindSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), model.NAME, model.TYPE, model.STATUS, model.DASHBOARD_UID)
func (s Table) SelectJoinService(m *ice.Message, arg ...string) *ice.Message {
kit.If(len(arg) == 0, func() { arg = append(arg, model.NODENAME, model.INDEX) })
return s.SelectJoin(m, service{}, arg...)
}
func (s Table) SelectJoinAuth(m *ice.Message, arg ...string) *ice.Message {
kit.If(len(arg) == 0, func() { arg = append(arg, model.NAME, model.AUTH_TYPE, model.AUTH_STATUS, model.DASHBOARD_UID) })
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
return s.SelectJoin(m, s.findSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), arg...)
}
func (s Table) RenameAppend(m *ice.Message, arg ...string) Table {
m.RenameAppend(arg...)
@ -327,7 +332,7 @@ func (s Portal) SendTemplate(m *ice.Message, arg ...string) {
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)) })
link := s.Link(m, place_uid, arg[0], uid)
m.Cmd(s.FindSpaceCmd(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], arg[2], link, kit.JoinWord(m.Option(model.PORTAL_NAME), arg[3]), name, kit.Cut(uid, 6))
}
func (s Table) Button(m *ice.Message, info string, arg ...ice.Any) *ice.Message {
kit.If(!m.IsErr() && m.Length() == 0, func() { m.Options(ctx.STYLE, html.FORM).EchoInfoButton(info, arg...) })
@ -387,7 +392,7 @@ func (s Table) ProcessPodCmd(m, msg *ice.Message, arg ...string) *ice.Message {
m.Push("field.option", kit.Format(kit.Dict(arg)))
m.RewriteAppend(func(value, key string, index int) string {
kit.If(key == ctx.STYLE, func() { value = html.OUTPUT })
kit.If(key == web.SPACE, func() { value = m.Appendv("_space")[index] })
// kit.If(key == web.SPACE, func() { value = m.Appendv("_space")[index] })
return value
})
if msg.Append(web.SPACE) != "" {
@ -395,21 +400,35 @@ func (s Table) ProcessPodCmd(m, msg *ice.Message, arg ...string) *ice.Message {
}
return m
}
func (s Table) SpaceCmd(m *ice.Message, space string, arg ...ice.Any) *ice.Message {
func (s Table) spaceCmd(m *ice.Message, space string, arg ...ice.Any) *ice.Message {
if space == ice.Info.NodeName {
return m.Cmd(arg...)
} else {
return m.Cmd(append([]ice.Any{web.SPACE, kit.Keys(ice.OPS, space)}, arg...)...)
}
}
func (s Table) FindSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
func (s Table) findSpaceCmd(m *ice.Message, cmd ice.Any) ice.Any {
cmds := ice.GetTypeKey(cmd)
if space, ok := api.Trans[cmds]; ok && space != ice.Info.NodeName {
m.Options(ice.MSG_USERROLE, aaa.TECH)
if space, ok := cmdSpace[cmds]; ok && space != ice.Info.NodeName {
m.Options(ice.MSG_USERROLE, aaa.TECH, ice.MSG_USERPOD, space)
return []string{web.SPACE, kit.Keys(ice.OPS, space), cmds}
}
return cmd
}
func (s Table) SaveBack(m *ice.Message, arg ...string) func() {
list := []string{}
kit.For(arg, func(k string) { list = append(list, m.Option(k)) })
return func() {
kit.For(arg, func(i int, k string) { m.Option(k, list[i]) })
}
}
func (s Table) AutoCmdy(m *ice.Message, arg ...ice.Any) *ice.Message {
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
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 {
return m.Cmd(append([]ice.Any{s.findSpaceCmd(m, arg[0])}, arg[1:]...)...)
}
func (s Table) Link(m *ice.Message, arg ...string) string {
return Portal{}.Link(m, arg...)
}

View File

@ -3,7 +3,7 @@ Volcanos(chat.ONIMPORT, {
can.onimport.myView(can, msg, function(value) { value._style = [value.who, value.member_status]
return [
{view: html.TITLE, list: [
value.user_name, value.auth_name,
value.user_name,
can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE),
can.onimport.titleAction(can, value),
]},

View File

@ -106,6 +106,7 @@ const (
ARGS = "args"
INIT = "init"
UNIT = "unit"
PORTAL = "portal"
)
type Sess struct {
@ -226,6 +227,7 @@ type Message struct {
type Recent struct {
db.ModelCommand
UserUID string `gorm:"type:char(32);index"`
PlaceUID string `gorm:"type:char(32)"`
ServiceUID string `gorm:"type:char(32)"`
AuthStatus uint8 `gorm:"default:0"`
Score uint8 `gorm:"default:0"`

View File

@ -19,6 +19,7 @@ $output>div.header { border-radius:100px; background-color:var(--notice-bg-color
$output>div.footer { border-radius:100px; background-color:var(--notice-bg-color); height:300px; width:100%; position:absolute; bottom:-100px; left:0; }
$output>div>div.list { box-shadow:var(--box-shadow); border-radius:10px; background-color:var(--output-bg-color); padding:10px; margin:10px; }
$output>div>div.list.mycount { min-height:105px; }
$output>div>div.list.myplace>div.output { max-height:420px; }
$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 { overflow:hidden; }

View File

@ -7,7 +7,7 @@ import (
"shylinux.com/x/icebergs/base/mdb"
"shylinux.com/x/icebergs/base/tcp"
"shylinux.com/x/icebergs/base/web"
"shylinux.com/x/toolkits"
kit "shylinux.com/x/toolkits"
"shylinux.com/x/community/src/api"
"shylinux.com/x/community/src/gonganxitong/model"
@ -31,6 +31,8 @@ type Portal struct {
placeCreate string `name:"placeCreate city_name* street_name* place_name* place_type*:select address" icon:"bi bi-plus-square-dotted" role:"void"`
placeRemove string `name:"placeRemove" role:"void"`
placeAuth string `name:"placeAuth" role:"void"`
command string `name:"command" role:"void"`
run string `name:"run" role:"void"`
}
func (s Portal) Init(m *ice.Message, arg ...string) {
@ -44,7 +46,7 @@ func (s Portal) Exit(m *ice.Message, arg ...string) {
}
func (s Portal) BeforeMigrate(m *ice.Message, arg ...string) {
if m.Cmd(web.CODE_MYSQL_CLIENT).Length() == 0 {
if m.Cmd(s.FindSpaceCmd(m, web.CODE_MYSQL_CLIENT)).Table(func(value ice.Maps) { m.Cmd(web.CODE_MYSQL_CLIENT, s.Create, aaa.SESS, "", kit.Simple(value)) }).Length() == 0 {
if s.AutoCmd(m, web.CODE_MYSQL_CLIENT).Table(func(value ice.Maps) { m.Cmd(web.CODE_MYSQL_CLIENT, s.Create, aaa.SESS, "", kit.Simple(value)) }).Length() == 0 {
m.Cmd(web.CODE_MYSQL_CLIENT, s.Create, aaa.SESS, "mysql", "driver", "mysql", "database", "mysql", tcp.HOST, "localhost", tcp.PORT, "10001", aaa.USERNAME, "root", aaa.PASSWORD, "root")
}
}
@ -55,11 +57,30 @@ func (s Portal) AfterMigrate(m *ice.Message, arg ...string) {
}
cmd := m.GetCommand()
m.Cmdy(s.Prefix(m, s.service), s.Table.Update, ctx.INDEX, m.PrefixKey(), mdb.NAME, cmd.Help+" "+ice.Info.Title(), mdb.ICON, m.Resource(kit.Select(ice.Info.NodeIcon, cmd.Icon)))
m.Cmd(command{}).Table(func(value ice.Maps) {
if kit.HasSuffix(value[model.INDEX], ".allow") {
cmdPortal[kit.ReplaceAll(value[model.INDEX], ".allow", ".portal")] = value[model.PORTAL]
cmdSpace[kit.ReplaceAll(value[model.INDEX], ".allow", ".portal")] = value[model.SPACE]
}
cmdPortal[value[model.INDEX]] = value[model.PORTAL]
cmdSpace[value[model.INDEX]] = value[model.SPACE]
})
}
func (s Portal) Inputs(m *ice.Message, arg ...string) {
m.Cmdy(s.Place, m.ActionKey(), arg)
}
func (s Portal) Command(m *ice.Message, arg ...string) {
if cmdPortal[arg[0]] != "" && cmdPortal[arg[0]] != m.PrefixKey() {
s.AutoCmdy(m, cmdPortal[arg[0]], m.ActionKey(), arg)
return
}
ctx.Command(m.Message, arg...)
}
func (s Portal) Run(m *ice.Message, arg ...string) {
if cmdPortal[arg[0]] != "" && cmdPortal[arg[0]] != m.PrefixKey() {
s.AutoCmdy(m, cmdPortal[arg[0]], m.ActionKey(), arg)
return
}
s.DisplayBase(m, "common.js")
m.OptionDefault(model.SERVICE_UID, ServiceUID(m))
m.OptionDefault(model.COMMAND_UID, s.Hash.List(m.Spawn(), arg[0]).Append(model.COMMAND_UID))
@ -94,6 +115,7 @@ func (s Portal) List(m *ice.Message, arg ...string) {
s.Hash.List(m, arg...).PushAction(mdb.DETAIL, s.Hash.Remove).SortInt(mdb.ORDER)
return
}
m.OptionDefault(model.SERVICE_UID, ServiceUID(m))
if len(arg) == 0 {
USER_PLACE_ROLE := s.Keys(s.UserPlace, model.ROLE)
m.Cmdy(m.PrefixKey(), s.PlaceList, m.Option(model.USER_UID)).Table(func(value ice.Maps) {
@ -193,7 +215,7 @@ func (s Portal) PlaceAuth(m *ice.Message, arg ...string) {
}
place_uid, place_name := m.Option(s.Keys(s.Place, model.UID)), m.Option(s.Keys(s.Place, model.NAME))
m.Option(model.COMPANY_NAME, m.Option(s.Keys(s.Street, model.NAME)))
msg := m.Cmd(s.FindSpaceCmd(m, api.RENZHENGSHOUQUAN_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME),
msg := s.AutoCmd(m, api.RENZHENGSHOUQUAN_PORTAL, s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME),
model.AUTH_TYPE, ice.AUTO, model.AUTH_NAME, place_name, model.FROM_UID, ice.AUTO,
model.SERVICE_UID, ServiceUID(m), model.PLACE_UID, place_uid,
)
@ -247,11 +269,10 @@ func (s Portal) BeforePlaceAuth(m *ice.Message, arg ...string) {}
func (s Portal) AfterPlaceAuth(m *ice.Message, arg ...string) {}
func (s Portal) AddRecent(m *ice.Message, arg ...string) {
m.Options(m.ConfigSimple(model.SERVICE_UID))
if kit.IsIn(m.Append(model.AUTH_STATUS), "2", "issued") {
m.Cmd(s.Prefix(m, s.recent), s.Create, s.GetCommands(m, model.SERVICE_UID, arg...), model.AUTH_STATUS, "2")
m.Cmd(s.Prefix(m, s.recent), s.Create, s.GetCommands(m, model.SERVICE_UID, arg...), model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)), model.AUTH_STATUS, "2")
} else {
m.Cmd(s.Prefix(m, s.recent), s.Create, s.GetCommands(m, model.SERVICE_UID, arg...))
m.Cmd(s.Prefix(m, s.recent), s.Create, s.GetCommands(m, model.SERVICE_UID, arg...), model.PLACE_UID, m.Option(s.Keys(s.Place, model.UID)))
}
}
func (s Portal) RecordEvent(m *ice.Message, arg ...string) {
@ -264,27 +285,27 @@ func (s Portal) MarketInsert(m *ice.Message, arg ...string) {
}
func (s Portal) DashboardCreate(m *ice.Message, name string, arg ...string) func() {
kit.If(name == "", func() { name = m.Option(s.Keys(s.Place, model.NAME)) })
m.Cmdy(s.FindSpaceCmd(m, api.DASHBOARD_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.DASHBOARD_NAME, name, model.DASHBOARD_TYPE, "0")
m.Cmd(s.FindSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), s.UpdateField, m.OptionSimple(model.DASHBOARD_UID), model.UID, m.Option(model.AUTH_UID))
s.AutoCmdy(m, api.DASHBOARD_PORTAL, s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.DASHBOARD_NAME, name, model.DASHBOARD_TYPE, "0")
s.AutoCmd(m, api.RENZHENGSHOUQUAN_AUTH, s.UpdateField, m.OptionSimple(model.DASHBOARD_UID), model.UID, m.Option(model.AUTH_UID))
return func() { s.DashboardUpdate(m) }
}
func (s Portal) DashboardInsert(m *ice.Message, score, title, unit string, index ice.Any, field string, arg ...ice.Any) {
kit.If(len(arg) == 0, func() { arg = append(arg, s.Keys(s.Place, model.UID), m.Option(s.Keys(s.Place, model.UID))) })
m.Cmd(s.FindSpaceCmd(m, api.DASHBOARD_SUMMARY), s.Insert, model.SPACE, m.Option(ice.MSG_USERPOD), model.INDEX, s.Prefix(m, index),
s.AutoCmd(m, api.DASHBOARD_SUMMARY, s.Insert, model.SPACE, m.Option(ice.MSG_USERPOD), model.INDEX, s.Prefix(m, index),
model.QUERY, kit.Format(arg), mdb.FIELD, field, model.TITLE, title, model.SCORE, score, model.UNIT, unit, m.OptionSimple(model.DASHBOARD_UID))
}
func (s Portal) DashboardUpdate(m *ice.Message, arg ...string) {
if m.Option(model.DASHBOARD_UID) != "" {
m.Cmd(s.FindSpaceCmd(m, api.DASHBOARD_SUMMARY), "scan", kit.Dict(m.OptionSimple(model.DASHBOARD_UID)))
s.AutoCmd(m, api.DASHBOARD_SUMMARY, "scan", kit.Dict(m.OptionSimple(model.DASHBOARD_UID)))
}
}
func (s Portal) StorageCreate(m *ice.Message, name string, arg ...string) {
kit.If(name == "", func() { name = m.Option(s.Keys(s.Place, model.NAME)) })
m.Cmdy(s.FindSpaceCmd(m, api.STORAGE_PORTAL), s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.STORAGE_NAME, name, model.STORAGE_TYPE, "0")
m.Cmd(s.FindSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), s.UpdateField, m.OptionSimple(model.STORAGE_UID), model.UID, m.Option(model.AUTH_UID))
s.AutoCmdy(m, api.STORAGE_PORTAL, s.PlaceCreate, m.OptionSimple(model.CITY_NAME, model.COMPANY_NAME), model.STORAGE_NAME, name, model.STORAGE_TYPE, "0")
s.AutoCmd(m, api.RENZHENGSHOUQUAN_AUTH, s.UpdateField, m.OptionSimple(model.STORAGE_UID), model.UID, m.Option(model.AUTH_UID))
}
func (s Portal) StorageInsert(m *ice.Message, title, content string) {
m.Cmd(s.FindSpaceCmd(m, api.STORAGE_FILE), s.Insert, model.TITLE, title, model.CONTENT, content, m.OptionSimple(model.STORAGE_UID, model.USER_UID))
s.AutoCmd(m, api.STORAGE_FILE, s.Insert, model.TITLE, title, model.CONTENT, content, m.OptionSimple(model.STORAGE_UID, model.USER_UID))
}
func init() { ice.TeamCtxCmd(Portal{Table: newTable()}) }

View File

@ -24,6 +24,7 @@ Volcanos(chat.ONIMPORT, {
can.core.List(["_place_uid", "_place_name", "_place_type", "_user_place_role", "_street_name"], function(key) { can.Conf(key, msg.Option(key)) })
var PLACE_UID = can.Conf("_place_uid"), PLACE_NAME = can.Conf("_place_name"), PLACE_TYPE = can.Conf("_place_type")
var USER_PLACE_ROLE = can.Conf("_user_place_role"), STREET_NAME = can.Conf("_street_name")
can.user.isMobile && (can.db.hash = [])
can.isCmdMode() && (can.db.hash = can.base.Obj(can.misc.SearchHash(can), can.db.hash)), can.db.hash[0] && can.onexport.place(can, can.db.hash[0])
if (can.db.hash.length > 1 && can.db.hash[1]) {
msg.Table(function(value) {
@ -84,7 +85,7 @@ Volcanos(chat.ONIMPORT, {
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, name, help)}]}])
},
myCount: function(can, value, target) {
var show = can.onmotion.toggle(can, target, value.dashboard_uid && (!value.member_status || value.member_status == "normal"))
var show = can.onmotion.toggle(can, target, !!value.dashboard_uid && (!value.member_status || value.member_status == "normal"))
if (can.onmotion.cache(can, function() { return value._uid }, target) || !show) { return }
can.onimport.myTitle(can, "My Count", "我的数据", target)
can.onappend.plugin(can._root.Action, {width: can.ConfWidth()-40, space: "20240903-operation", index: "web.team.dashboard.summary", args: [value.dashboard_uid]}, function(sub) {

View File

@ -13,6 +13,9 @@
"auth": "认证",
"authCreate": "认证申请",
"icons": {
"user": "https://img.icons8.com/officel/80/qr-code.png",
"city": "https://img.icons8.com/officel/80/qr-code.png",
"street": "https://img.icons8.com/officel/80/qr-code.png",
"qrcode": "https://img.icons8.com/officel/80/qr-code.png",
"event": "https://img.icons8.com/officel/80/property-with-timer.png",
"apply": "https://img.icons8.com/officel/80/edit-property.png",

View File

@ -35,10 +35,13 @@ func (s setting) Update(m *ice.Message, arg ...string) {
}
}
func (s setting) Profile(m *ice.Message, arg ...string) {
s.Fields(m, s.Key(s, model.PLACE_UID))
s.Select(m, s.Key(s, model.USER_UID), arg[0], s.Key(s, model.NAME), "profile", s.Key(s, model.VALUE), "on")
return
s.Tables(m, "LEFT JOIN recents ON args = settings.place_uid AND recents.user_uid = settings.user_uid AND recents.deleted_at IS NULL", s.service).Fields(m,
model.SERVICE_ICON, model.SERVICE_NAME,
s.Key(s.recent, model.CITY_NAME), s.Key(s.recent, model.STREET_NAME), s.Key(s.recent, model.PLACE_NAME),
s.AS(model.NODENAME, model.SPACE), model.INDEX, model.PLACE_UID,
s.AS(model.NODENAME, model.SPACE), model.INDEX, s.Key(s, model.PLACE_UID),
)
s.Select(m, s.Key(s, model.USER_UID), arg[0], s.Key(s, model.NAME), "profile", s.Key(s, model.VALUE), "on")
}
@ -47,13 +50,13 @@ func (s Table) SettingProfile(m *ice.Message, arg ...string) *ice.Message {
}
func (s setting) List(m *ice.Message, arg ...string) {
if len(arg) == 1 {
msg := m.Spawn()
data := ice.Maps{}
s.Select(msg, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID))
msg := s.Select(m.Spawn(), s.Key(s, model.PLACE_UID), arg[0], s.Key(s, model.USER_UID), m.Option(model.USER_UID))
msg.Table(func(value ice.Maps) { data[value[model.NAME]] = value[model.VALUE] })
s.Hash.List(m).Table(func(value ice.Maps) { m.Push(model.VALUE, data[value[model.NAME]]) })
m.Action()
} else if len(arg) == 2 {
s.SelectDetail(m, model.PLACE_UID, arg[0], model.USER_UID, m.Option(model.USER_UID), model.NAME, arg[1])
s.SelectDetail(m, s.Key(s, model.PLACE_UID), arg[0], s.Key(s, model.USER_UID), m.Option(model.USER_UID), model.NAME, arg[1])
}
s.Display(m, "").DisplayCSS("")
}

View File

@ -20,7 +20,7 @@ type user struct {
modify string `name:"modify user_name user_info" role:"void"`
email string `name:"email email*"`
list string `name:"list uid auto" role:"void"`
authCreate string `name:"authCreate city_name* company_name* auth_name* auth_info" role:"tech"`
authCreate string `name:"authCreate city_name* company_name* auth_name* auth_info" role:"void"`
}
func (s user) Create(m *ice.Message, arg ...string) {

View File

@ -38,6 +38,11 @@ func (s Auth) List(m *ice.Message, arg ...string) {
}
}).Display("")
}
func (s Auth) SelectList(m *ice.Message, arg ...string) {
s.Table.SelectList(m, arg...)
s.RenameAppend(m, model.TYPE, model.AUTH_TYPE, model.STATUS, model.AUTH_STATUS)
s.RewriteAppend(m)
}
func (s Auth) MemberList(m *ice.Message, arg ...string) {
m.Cmdy(m.Prefix("member"), arg[0])
}
@ -53,7 +58,7 @@ func (s Auth) Issue(m *ice.Message, arg ...string) {
}
}
s.Update(m, kit.Dict(model.STATUS, AuthIssued), model.FROM_UID, m.Option(model.AUTH_UID), model.UID, m.Option(model.UID))
switch s.Select(m, model.UID, m.Option(model.UID)); AuthType(kit.Int(m.Append(model.TYPE))) {
switch s.Select(m, model.UID, m.Option(model.UID)); AuthType(kit.Int(m.Append(model.AUTH_TYPE))) {
case AuthCity:
m.Cmd("web.team.gonganxitong.city", s.UpdateAuth, m.Option(model.UID), model.NAME, m.Append(model.NAME))
case AuthPersonal:
@ -69,12 +74,6 @@ func (s Auth) Issue(m *ice.Message, arg ...string) {
func (s Auth) Revoke(m *ice.Message, arg ...string) {
s.Update(m, kit.Dict(model.STATUS, AuthRevoked), model.FROM_UID, m.Option(model.AUTH_UID), model.UID, m.Option(model.UID))
}
func (s Auth) Storage(m *ice.Message, arg ...string) {
s.Update(m, kit.Dict(model.STORAGE_UID, arg[1]), model.UID, arg[0])
}
func (s Auth) Dashboard(m *ice.Message, arg ...string) {
s.Update(m, kit.Dict(model.DASHBOARD_UID, arg[1]), model.UID, arg[0])
}
func init() { ice.TeamCtxCmd(Auth{}) }

View File

@ -30,6 +30,8 @@ const (
SPACE = "space"
INDEX = "index"
PATH = "path"
BACKGROUND = "background"
AVATAR = "avatar"
)
type UserAuth struct {

View File

@ -3,7 +3,9 @@
"cert": "上传证件", "auth": "认证授权", "profile": "用户名片",
"certList": "证件", "memberList": "成员",
"issue": "认证", "revoke": "吊销",
"enter": "进入",
"style": {
"enter": "notice",
"issue": "notice",
"revoke": "danger"
},

View File

@ -32,6 +32,14 @@ func (s profile) Upload(m *ice.Message, arg ...string) {
func (s profile) AuthList(m *ice.Message, arg ...string) {
m.Cmdy(s.Auth, m.Option(model.AUTH_UID))
kit.If(s.IsVisitor(m), func() { m.PushAction() })
s.SelectJoinService(m)
m.Table(func(value ice.Maps) {
if value[model.SERVICE_UID] == "" {
m.PushButton()
} else {
m.PushButton(s.Enter)
}
})
s.RewriteAppend(m)
}
func (s profile) MemberList(m *ice.Message, arg ...string) {
@ -43,9 +51,12 @@ func (s profile) MemberList(m *ice.Message, arg ...string) {
func (s profile) SystemList(m *ice.Message, arg ...string) {
list := s.SettingProfile(m.Spawn(), arg...).Appendv(model.PLACE_UID)
s.FieldsWithCreatedAT(m, s.Auth, kit.TransArgs(kit.Split(m.Config(mdb.FIELDS), ",", ","))...)
s.SelectList(m, kit.Simple(model.PLACE_UID, list)...)
s.SelectList(m, kit.Simple(model.PLACE_UID, kit.Sort(list))...)
s.SelectJoinService(m).PushAction(s.Enter)
s.RewriteAppend(m)
}
func (s profile) Enter(m *ice.Message, arg ...string) {
}
func (s profile) List(m *ice.Message, arg ...string) {
if len(arg) == 1 {
s.Select(m, model.UID, arg[0]).Display("")
@ -53,5 +64,14 @@ func (s profile) List(m *ice.Message, arg ...string) {
}
s.RewriteAppend(m)
}
func (s profile) RewriteAppend(m *ice.Message, arg ...string) {
s.Table.RewriteAppend(m)
m.RewriteAppend(func(value, key string, index int) string {
if value != "" && kit.IsIn(key, model.BACKGROUND, model.AVATAR) {
value = m.Resource(value)
}
return value
})
}
func init() { ice.TeamCtxCmd(profile{}) }

View File

@ -19,7 +19,7 @@ Volcanos(chat.ONIMPORT, {
can.runAction(can.request({}, {auth_uid: msg.Append(UID)}), "authList", [], function(msg) {
can.onimport.myView(can, msg, function(value) { value.avatar = value.avatar||"usr/icons/avatar.jpg"
return [
{view: html.TITLE, list: [value.name, can.onimport.authView(can, value), can.onimport.textView(can, value, "auth_type")]},
{view: html.TITLE, list: [value.name, can.onimport.authView(can, value), can.onimport.textView(can, value, "auth_type"), can.onimport.titleAction(can, value)]},
{view: html.STATUS, list: [value.info]},
]
}, function(event, value) {
@ -47,7 +47,7 @@ Volcanos(chat.ONIMPORT, {
can.runAction(can.request({}, {}), "systemList", [msg.Append("user_uid")||msg.Option("user_uid")], function(msg) {
can.onimport.myView(can, msg, function(value) { value.avatar = value.avatar||"usr/icons/avatar.jpg"
return [
{view: html.TITLE, list: [value.name, can.onimport.authView(can, value), can.onimport.textView(can, value, "auth_type")]},
{view: html.TITLE, list: [value.name, can.onimport.authView(can, value), can.onimport.textView(can, value, "auth_type"), can.onimport.titleAction(can, value)]},
{view: html.STATUS, list: [value.info]},
]
}, function(event, value) {
@ -57,6 +57,9 @@ Volcanos(chat.ONIMPORT, {
},
})
Volcanos(chat.ONACTION, {
enter: function(event, can) { var msg = can.request(event)
can.onimport.myPlugin(can, {space: msg.Option("service_nodename"), index: msg.Option("service_index"), args: [msg.Option("place_uid")]})
},
updateBackground: function(event, can) { can.user.upload(can.request(event, {field: aaa.BACKGROUND}), can) },
updateAvatar: function(event, can) { can.user.upload(can.request(event, {field: aaa.AVATAR}), can) },
})