mirror of
https://shylinux.com/x/community
synced 2025-04-25 17:48:06 +08:00
add some
This commit is contained in:
parent
3f2a1009b8
commit
1cb33af96e
@ -134,6 +134,7 @@ func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.M
|
||||
defer m.Options(db.FIELDS, fields).Set(ice.MSG_OPTION, db.FIELDS)
|
||||
}
|
||||
if s.ValueModel(m, s.ValueList, arg...); len(arg) == 1 {
|
||||
s.UserPlaceInit(m)
|
||||
s.Button(m, "")
|
||||
}
|
||||
return s.SelectJoinUser(m)
|
||||
@ -180,7 +181,7 @@ func (s Table) SelectJoinAuth(m *ice.Message, arg ...string) *ice.Message {
|
||||
return m
|
||||
}
|
||||
kit.If(len(arg) == 0, func() {
|
||||
arg = append(arg, model.NAME, model.AUTH_TYPE, model.AUTH_STATUS, model.AVATAR, model.DASHBOARD_UID)
|
||||
arg = append(arg, model.NAME, model.INFO, model.AUTH_TYPE, model.AUTH_STATUS, model.AVATAR, model.BACKGROUND, model.DASHBOARD_UID)
|
||||
})
|
||||
defer s.SaveBack(m, ice.MSG_USERPOD, ice.MSG_USERROLE)()
|
||||
return s.SelectJoin(m, s.findSpaceCmd(m, api.RENZHENGSHOUQUAN_AUTH), arg...)
|
||||
|
@ -12,7 +12,7 @@ type credit struct {
|
||||
Tables
|
||||
user user
|
||||
city city
|
||||
order string `data:"102"`
|
||||
order string `data:"101"`
|
||||
authCity string `name:"authCity" role:"void"`
|
||||
authPersonal string `name:"authPersonal" role:"void"`
|
||||
authService string `name:"authService" role:"void"`
|
||||
|
@ -2,7 +2,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onimport.myView(can, msg, function(value) { return [
|
||||
{view: html.TITLE, list: [value.user_name, can.onimport.timeView(can, value)]},
|
||||
{view: html.OUTPUT, list: [value.info]},
|
||||
{view: html.STATUS, list: [value.info]},
|
||||
] })
|
||||
},
|
||||
})
|
@ -10,7 +10,7 @@ import (
|
||||
type member struct {
|
||||
Tables
|
||||
user user
|
||||
order string `data:"101"`
|
||||
order string `data:"102"`
|
||||
}
|
||||
|
||||
func (s member) Remove(m *ice.Message, arg ...string) {
|
||||
|
@ -5,6 +5,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
return [
|
||||
{view: html.TITLE, list: [value.user_name,
|
||||
can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE),
|
||||
value.member_status != "normal" && can.onimport.textView(can, value, "member_status"),
|
||||
can.onimport.titleAction(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [value.uid.slice(0, 6), can.onimport.timeView(can, value),
|
||||
|
@ -47,6 +47,7 @@ const (
|
||||
AUTH_TYPE = "auth_type"
|
||||
AUTH_STATUS = "auth_status"
|
||||
AUTH_AVATAR = "auth_avatar"
|
||||
AUTH_BACKGROUND = "auth_background"
|
||||
DASHBOARD_UID = "dashboard_uid"
|
||||
DASHBOARD_NAME = "dashboard_name"
|
||||
DASHBOARD_TYPE = "dashboard_type"
|
||||
|
@ -1,4 +1,5 @@
|
||||
body.dark { --plugin-bg-color:#0d1117; --output-bg-color:#171a22; }
|
||||
body.mobile.light { --plugin-bg-color:#f4f5f9; --output-bg-color:#fefefd; }
|
||||
body.mobile fieldset.Action div.input.float { position:static; }
|
||||
body.mobile fieldset.Action div.input.float table { width:100%; }
|
||||
body.mobile div.upload.float div.action { display:flex; }
|
||||
@ -10,20 +11,19 @@ $action div.item.button input { border:none; background-color:var(--plugin-bg-co
|
||||
$action div.item.button input:hover { background-color:var(--hover-bg-color); }
|
||||
$action div.item.button span { display:none; }
|
||||
$action div.item.button i { display:none; }
|
||||
$output div.title div.action div.item.notice input {
|
||||
background-color:var(--notice-bg-color); color:var(--notice-fg-color);
|
||||
}
|
||||
$output div.title div.action div.item.notice input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output { background-color:var(--plugin-bg-color); }
|
||||
// $output div.head { margin-bottom:20px; }
|
||||
$output div.head>img { height:200px; width:100%; object-fit:cover; }
|
||||
$output div.head div.item.card img { border-radius:25px; }
|
||||
$output div.head>div.item.card div.title div.item.button i { display:none; }
|
||||
$output>div.header { border-radius:100px; background-color:var(--notice-bg-color); height:300px; width:100%; position:absolute; top:-100px; left:0; }
|
||||
$output>div.header { border-radius:100px; background-color:var(--notice-bg-color); height:300px; width:100%; position:absolute; top:-50px; left:0; }
|
||||
$output>div.header img { height:100%; width:100%; }
|
||||
$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 { border-radius:10px; background-color:var(--output-bg-color); padding:10px; margin:10px; }
|
||||
$output>div>div.list.myplace>div.output { padding:0 10px; max-height:420px; }
|
||||
$output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:yellow; margin-right:10px; }
|
||||
$output>div>div.code { margin-top:60px; margin-bottom:240px; display:flex; flex-direction:column; align-items:center; }
|
||||
$output>div>div.list.mynotice>span.title { flex-grow:1; margin:0 5px; }
|
||||
$output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:var(--notice-bg-color); margin-right:5px; }
|
||||
$output>div>div.list.mynotice>span:last-child { color:gray; }
|
||||
$output>div>div.list.mynotice:not(.hide) { display:flex; align-items:center; }
|
||||
$output>div>div.list.mycount { min-height:105px; }
|
||||
$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:200px; transition:width 0.5s; }
|
||||
@ -46,30 +46,32 @@ $output>div>div.list>div.output>div.item.index span { font-size:12px; white-spac
|
||||
$output>div>div.list div.code { text-align:center; }
|
||||
$output>div>div.list div.code input { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; margin:auto; min-width:200px; display:block; margin-top:10px; }
|
||||
$output>div>div.list fieldset.story>div.output { background-color:var(--output-bg-color); }
|
||||
$output div.head>img { height:200px; width:100%; object-fit:cover; }
|
||||
$output div.head div.item.card img { border-radius:25px; }
|
||||
$output div.head>div.item.card div.title div.item.button i { display:none; }
|
||||
$output div.tabs { height:32px; display:flex; position:unset; }
|
||||
$output div.tabs span { padding:5px 10px; }
|
||||
$output div.tabs span.select { background-color:var(--output-bg-color); color:var(--hover-fg-color); }
|
||||
$output div.item.card { margin-bottom:2px; }
|
||||
$output div.item.card>div.output>div { width:100%; }
|
||||
$output div.item.card div.title { width:100%; display:flex; align-items:center; }
|
||||
body:not(.mobile) $output div.item.card div.title div.action { display:none; }
|
||||
$output div.item.card div.title span:first-child { word-break:break-all; }
|
||||
$output div.item.card div.title span.auth { font-size:14px; }
|
||||
$output div.item.card div.title span.time { position:absolute; right:0; font-size:12px; color:gray; }
|
||||
$output div.item.card div.status span { word-break:break-all; }
|
||||
$output div.item.card img { border-radius:5px; padding:0; margin:0; margin-right:10px; height:48px; width:48px; min-width:48px; }
|
||||
$output div.item.card img { border-radius:5px; padding:0; margin:0; margin-right:10px; height:48px; width:48px; min-width:48px; object-fit:cover; }
|
||||
$output div.item.card.sticky>div.output { background-color:var(--plugin-bg-color); color:var(--notice-bg-color); }
|
||||
$output table.content { background-color:var(--output-bg-color); }
|
||||
$output table.content td.action input.icons { display:unset; }
|
||||
$output table.content td.action input { padding:0 20px; min-width:80px; }
|
||||
$output table.content td.action i { display:none; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
$action div.item.notice input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); }
|
||||
$action div.item.danger input[type=button] { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output input.notice[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output input.danger[type=button] { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output input[type=button][name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
$output img.qrcode { width:100%; margin:0; }
|
||||
$output span.type { border:none; border-radius:5px; background-color:var(--hover-bg-color); padding:2px 8px; }
|
||||
$output span.role { border:none; border-radius:5px; background-color:var(--hover-bg-color); padding:2px 8px; }
|
||||
$output span.type.danger { color:var(--danger-bg-color); }
|
||||
$output span.role.danger { color:var(--danger-bg-color); }
|
||||
/*
|
||||
$output span.type { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; white-space:pre; }
|
||||
$output span.role { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; white-space:pre; }
|
||||
$output span.level { border:var(--box-notice); color:var(--notice-bg-color); padding:0 3px; font-size:12px; white-space:pre; }
|
||||
@ -77,8 +79,16 @@ $output span.type.danger { border:var(--box-danger); color:var(--danger-bg-color
|
||||
$output span.role.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output span.level.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
$output span.status.danger { border:var(--box-danger); color:var(--danger-bg-color); }
|
||||
*/
|
||||
|
||||
$output table.content { background-color:var(--output-bg-color); }
|
||||
$output table.content td.action input.icons { display:unset; }
|
||||
$output table.content td.action input { padding:0 20px; min-width:80px; }
|
||||
$output table.content td.action i { display:none; }
|
||||
$output table.content.detail tr.action input.icons { display:unset; }
|
||||
$output table.content.detail tr.action i { display:none; }
|
||||
$output table.content.detail tr.uid { display:none; }
|
||||
$output>fieldset.story { margin-top:48px; }
|
||||
$output>fieldset.story.web.team.renzhengshouquan.profile { margin-top:0; }
|
||||
$output fieldset.story { box-shadow:none; }
|
||||
$output fieldset.story>legend { display:none; }
|
||||
$output fieldset.story>form.option { display:none; }
|
||||
@ -91,13 +101,8 @@ $output fieldset.story>div.output table.content tr.user_avatar td img { max-heig
|
||||
$output fieldset.story>div.output table.content tr.auth_avatar td img { max-height:128px; max-width:128px; }
|
||||
$output fieldset.story>div.output>div.code { text-align:center; }
|
||||
$output fieldset.story>div.output>div.code>img { display:block; margin:auto; width:100%; max-width:390px; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button] {
|
||||
background-color:var(--notice-bg-color); color:var(--notice-fg-color);
|
||||
margin-right:10px; float:right;
|
||||
}
|
||||
$output fieldset.story>div.output>div.code>input[type=button].danger {
|
||||
border:var(--box-danger); background-color:transparent; color:var(--danger-bg-color);
|
||||
}
|
||||
$output fieldset.story>div.output>div.code>input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); margin-right:10px; float:right; }
|
||||
$output fieldset.story>div.output>div.code>input[type=button].danger { border:var(--box-danger); background-color:transparent; color:var(--danger-bg-color); }
|
||||
$output fieldset.story>div.output>div.code div.item.button { margin-top:20px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); font-size:18px; min-width:240px; height:36px; }
|
||||
$output fieldset.story>div.output>div.code div.item.button input[type=button][name=cancel] { border:var(--box-border); background-color:var(--danger-bg-color); color:var(--danger-fg-color); }
|
||||
@ -105,6 +110,9 @@ $output fieldset.story>div.output>div.code div.item.button.danger input[type=but
|
||||
$output>fieldset.story>div.output div.item.card>div.output { padding:10px; width:100%; }
|
||||
$output>fieldset.story>div.output div.item.card>div.output div.output { padding:5px 0; white-space:pre-line; }
|
||||
$output fieldset.story.form>div.output>div.code>input[type=button] { font-size:18px; margin:10px; height:36px; }
|
||||
$output>fieldset.story.web.team.renzhengshouquan.profile { margin-top:0; }
|
||||
fieldset.web.team.renzhengshouquan.profile>div.output div.code { margin-top:60px; margin-bottom:240px; }
|
||||
$output>fieldset.story.web.team.credit { margin-top:0; }
|
||||
$output>fieldset.message div.tabs span.select { border-top:var(--box-border); }
|
||||
$output>fieldset.message div.tabs span.create.select { border-top:var(--box-danger); }
|
||||
$output>fieldset.message div.tabs span.read.select { border-top:var(--box-notice); }
|
||||
@ -120,13 +128,16 @@ $output>fieldset.market>div.output>div.list div.item.card div.output div.action
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action i { margin-right:5px; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.output { padding:10px 0; }
|
||||
$output>fieldset.market>div.output>div.list div.item.card div.output div.action div.item.done { color:var(--notice-bg-color); }
|
||||
$output.background>div.output { padding-top:120px; }
|
||||
$output.public>div>div.list>div.title { display:none; }
|
||||
$output.public>div>div.list.myplace>div.output { padding:0; }
|
||||
$output.public>div>div.list.myplace div.item.card div.output { padding:0; }
|
||||
fieldset.web.team.storage.file div.item.card div.title span:first-child { flex-grow:1; }
|
||||
body.dark $output>div>div.list.mynotice>span:first-child { background-color:var(--hover-bg-color); color:yellow; white-space:pre; }
|
||||
body.mobile div.input.float { position:absolute; top:0 !important; margin:0; width:100% !important; max-width:100% !important; }
|
||||
fieldset.web.team.storage.file div.item.card div.title span:first-child {
|
||||
flex-grow:1;
|
||||
}
|
||||
body.mobile div.input.float input[name=submit] { background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||
body.light.mobile { --plugin-bg-color:#f4f5f9; --output-bg-color:#fefefd; }
|
||||
body.mobile fieldset.panel.Action>div.output { background-color:var(--plugin-bg-color); }
|
||||
body:not(.mobile) $output>fieldset.story>div.output div.item.card:not(:hover) { background-color:var(--output-bg-color); }
|
||||
body:not(.mobile) $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; }
|
||||
|
@ -118,6 +118,8 @@ func (s Portal) List(m *ice.Message, arg ...string) {
|
||||
} else {
|
||||
if msg := s.PlaceListOption(m, arg...); arg[0] != "" && msg.Length() > 0 {
|
||||
defer s.AddRecent(msg, arg[0])
|
||||
defer m.Echo(msg.Append(model.CITY_NAME) + " " + msg.Append(s.Keys(s.Street, model.NAME)) + " " + msg.Append(s.Keys(s.Place, model.NAME)))
|
||||
defer m.EchoQRCode(s.Link(m.Spawn(), arg[0]).Result())
|
||||
}
|
||||
s.Hash.List(m).SortInt(mdb.ORDER)
|
||||
}
|
||||
@ -143,7 +145,7 @@ func (s Portal) PlaceListOption(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Place.RewriteAppend(msg)
|
||||
m.Options(msg.AppendSimple(
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE),
|
||||
model.CITY_NAME, s.Keys(s.Street, model.NAME), model.AUTH_STATUS, model.AUTH_AVATAR, model.DASHBOARD_UID,
|
||||
model.CITY_NAME, s.Keys(s.Street, model.NAME), model.AUTH_STATUS, model.AUTH_NAME, model.AUTH_INFO, model.AUTH_AVATAR, model.AUTH_BACKGROUND, model.DASHBOARD_UID,
|
||||
))
|
||||
m.Option(model.STREET_NAME, msg.Append(s.Keys(s.Street, model.NAME)))
|
||||
m.Option(model.PLACE_NAME, msg.Append(s.Keys(s.Place, model.NAME)))
|
||||
@ -174,7 +176,8 @@ func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace, s.Keys(s.Place, model.UID),
|
||||
s.Keys(s.Place, model.NAME), s.Keys(s.Place, model.TYPE), s.Keys(s.UserPlace, model.ROLE),
|
||||
s.Key(s.Place, model.INIT), s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS),
|
||||
s.Keys(s.Street, model.UID), model.AUTH_UID)
|
||||
s.Keys(s.Street, model.UID), model.AUTH_UID,
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, model.USER_UID, arg[0])
|
||||
} else if len(arg) == 2 {
|
||||
@ -334,8 +337,8 @@ func (s Portal) Modify(m *ice.Message, arg ...string) { s.Hash.Modify(m, arg...)
|
||||
func (s Portal) Show(m *ice.Message, arg ...string) {
|
||||
m.Cmd(s.Prefix(m, s), s.Create, ctx.INDEX, m.PrefixKey())
|
||||
}
|
||||
func (s Portal) Link(m *ice.Message, arg ...string) {
|
||||
m.Echo(m.MergePodCmd("", s.Prefix(m, s), s.Keys(s.Place, model.UID), arg[0]) +
|
||||
func (s Portal) Link(m *ice.Message, arg ...string) *ice.Message {
|
||||
return m.Echo(m.MergePodCmd("", s.Prefix(m, s), s.Keys(s.Place, model.UID), arg[0]) +
|
||||
"#" + kit.TrimSuffix(kit.Join([]string{arg[0], kit.Select("", arg, 1), kit.Select("", arg, 2)}, ":"), ":", ":"))
|
||||
}
|
||||
|
||||
|
@ -1,29 +1,26 @@
|
||||
var UID = "uid", PLACE_UID = "place_uid", PLACE_NAME = "place_name", PLACE_TYPE = "place_type", STREET_NAME = "street_name", CITY_NAME = "city_name"
|
||||
var USER_UID = "user_uid", USER_ROLE = "user_role", AUTH_UID = "auth_uid", AUTH_TYPE = "auth_type"
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) {
|
||||
can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg)
|
||||
},
|
||||
_init: function(can, msg) { can.onappend.style(can, html.OUTPUT), can.onimport.myPortal(can, msg) },
|
||||
myValue: function(can, value) { return [
|
||||
{view: html.TITLE, list: [value._name, can.onimport.authView(can, value),
|
||||
{view: html.TITLE, list: [value.auth_name||value._name, can.onimport.authView(can, value),
|
||||
{text: [value.__type, "", [mdb.TYPE, value._type, value._type_style]]}, value._role != "visitor" && {text: [value.__role, "", [aaa.ROLE, value._role, value._role_style]]},
|
||||
]},
|
||||
{view: html.STATUS, list: [
|
||||
// value.uid.slice(0, 6), can.onimport.timeView(can, value),
|
||||
can.onimport.cityView(can, value), can.onimport.streetView(can, value),
|
||||
]},
|
||||
{view: html.STATUS, list: [value.city_name, value._street, can.ConfHelp(), can.user.info.titles]},
|
||||
{view: html.STATUS, list: [value.auth_info||value._info]},
|
||||
] },
|
||||
myTrans: function(can, value) {
|
||||
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")
|
||||
value.icons = value.icons||value.avatar||value.auth_avatar||can.Conf(can.core.Keys("_trans.value", PLACE_TYPE, mdb.ICONS, value[PLACE_TYPE]||"what"))
|
||||
value._uid = value[PLACE_UID], value._name = value[PLACE_NAME], value._street = value[STREET_NAME]
|
||||
value._type = value[PLACE_TYPE], value.__type = can.user.transValue(can, value, PLACE_TYPE)
|
||||
value._role = value[USER_PLACE_ROLE], value.__role = can.user.transValue(can, value, USER_PLACE_ROLE)
|
||||
value._role_style = can.onimport.roleStyle(can, value, USER_PLACE_ROLE)
|
||||
value._type_style = can.onimport.typeStyle(can, value, PLACE_TYPE)
|
||||
value._type = value[PLACE_TYPE], value.__type = can.user.transValue(can, value, PLACE_TYPE), value._type_style = can.onimport.typeStyle(can, value, PLACE_TYPE)
|
||||
value._role = value[USER_PLACE_ROLE], value.__role = can.user.transValue(can, value, USER_PLACE_ROLE), value._role_style = can.onimport.roleStyle(can, value, USER_PLACE_ROLE)
|
||||
return value
|
||||
},
|
||||
myTitle: function(can, name, help, target) {
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, name, help)}]}])
|
||||
},
|
||||
myPortal: function(can, msg) { can.sup.current = {}
|
||||
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")
|
||||
@ -45,19 +42,21 @@ Volcanos(chat.ONIMPORT, {
|
||||
can.onmotion.hidden(can, can.ui.mynotice)
|
||||
can.onmotion.hidden(can, can.ui.myallow)
|
||||
function showIndex(msg) { if (msg.Length() == 0) { return }
|
||||
can.onimport.myNotice(can, msg, can.ui.mynotice)
|
||||
can.onimport.myCount(can, msg, can.ui.mycount)
|
||||
can.onimport.myNotice(can, msg, can.ui.mynotice)
|
||||
can.onimport.myIndex(can, msg, can.ui.myindex), can.onexport.index(can, can.sup.current)
|
||||
can.onimport.myAllow(can, msg, can.ui.myallow)
|
||||
can.onimport.myOrder(can, msg, can.ui.myorder)
|
||||
}
|
||||
if (can.Option(PLACE_UID) == "") { var uid = can.onimport.myPlace(can, msg, can.ui.myplace)
|
||||
msg.Length() > 0? can.run({}, [uid], function(msg) { showIndex(can._index_msg = msg) }): can.run({}, [uid], function(msg) { can.onimport.myOrder(can, can._index_msg = msg, can.ui.myorder) })
|
||||
} else {
|
||||
var _msg = can.request({}); if (msg.Option(PLACE_NAME)) {
|
||||
_msg.Push(kit.Dict(UID, "", msg.OptionSimple(PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME, "auth_status", "auth_avatar", "dashboard_uid")))
|
||||
} can.onimport.myPlace(can, _msg, can.ui.myplace)
|
||||
} else { can.onappend.style(can, "public", can._output)
|
||||
var _msg = can.request({}); if (msg.Option(PLACE_NAME)) { _msg.Push(kit.Dict(UID, "", msg.OptionSimple(
|
||||
PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME, "auth_status", "auth_avatar", "auth_background", "dashboard_uid",
|
||||
))) } can.onimport.myPlace(can, _msg, can.ui.myplace)
|
||||
if (_msg.Length() == 0) { can.onimport.myOrder(can, msg, can.ui.myorder) } else { showIndex(can._index_msg = msg) }
|
||||
can.onappend.board(can, msg, can.ui.output)
|
||||
can.user.agent.init(can, [msg.Option(CITY_NAME), msg.Option(STREET_NAME), msg.Option("auth_info")].join(" "), msg.Option("auth_avatar"))
|
||||
}
|
||||
},
|
||||
myPlace: function(can, msg, target) { var place_uid
|
||||
@ -72,27 +71,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
})), msg.Result() && can.onappend.board(can, msg.Result(), can.ui._target)
|
||||
return place_uid||""
|
||||
},
|
||||
myTitle: function(can, name, help, target) {
|
||||
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"))
|
||||
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) {
|
||||
can.onmotion.toggle(can, target, value._count = true)
|
||||
}, target)
|
||||
},
|
||||
myNotice: function(can, value, target) { if (value._notice_hide) { return can.onmotion.toggle(can, target, false) }
|
||||
if (can.onmotion.cache(can, function() { return value._uid }, target)) { return can.onmotion.toggle(can, target, true) }
|
||||
target.onclick = function() {
|
||||
can.onimport.myStory(can, {index: can.ConfIndex().split(".").slice(0, -1).concat(["notice"]).join("."), args: [value._uid]})
|
||||
}
|
||||
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")}])
|
||||
})
|
||||
},
|
||||
myInit: function(can, msg, value, target) { if (!msg) { return } can.onmotion.toggle(can, target, !!value._init)
|
||||
if (can.onmotion.cache(can, function() { return value._uid }, target)) { return } can.onimport.myTitle(can, "My Init", "我的初始化", target)
|
||||
msg.Table(function(val) { if (parseInt(val.init) == parseInt(value.init)+1) { value._init = true, val.args = [value._uid]
|
||||
@ -107,6 +85,25 @@ Volcanos(chat.ONIMPORT, {
|
||||
}, can.onmotion.toggle(can, target, !!value._init) }, target)
|
||||
} })
|
||||
},
|
||||
myCount: function(can, value, target) {
|
||||
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) {
|
||||
can.onmotion.toggle(can, target, value._count = true)
|
||||
}, target)
|
||||
},
|
||||
myNotice: function(can, value, target) { if (value._notice_hide) { return can.onmotion.toggle(can, target, false) }
|
||||
if (can.onmotion.cache(can, function() { return value._uid }, target)) { return can.onmotion.toggle(can, target, true) }
|
||||
target.onclick = function() {
|
||||
can.onimport.myStory(can, {index: can.ConfIndex().split(".").slice(0, -1).concat(["notice"]).join("."), args: [value._uid]})
|
||||
}
|
||||
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: "查看更多 >"},
|
||||
])
|
||||
})
|
||||
},
|
||||
myList: function(can, msg, target) {
|
||||
var width = (can.ConfWidth()-40)/parseInt((can.ConfWidth()-40)/80); can.user.isMobile && !can.user.isLandscape() && (width = (can.ConfWidth()-40)/5)
|
||||
can.page.Append(can, target, msg.Table(function(value) { if (value.enable == ice.FALSE) { return }
|
||||
@ -115,7 +112,6 @@ Volcanos(chat.ONIMPORT, {
|
||||
)], style: {width: width}, list: [
|
||||
{img: can.misc.ResourceIcons(can, value.icons)}, {text: can.user.trans(can, value.index.split(".").pop(), value.name)},
|
||||
], onclick: function(event) {
|
||||
if (value.index.split(".").pop() == "recent") {}
|
||||
can.onimport.myStory(can, {space: can.ConfSpace(), index: value.index, args: [can.onexport.place(can)||can.misc.Search(can, can.Conf("_place_uid"))]})
|
||||
}}
|
||||
}))
|
||||
@ -129,8 +125,7 @@ Volcanos(chat.ONIMPORT, {
|
||||
var _list = can.Conf("_trans.value."+can.Conf("_user_place_role"))
|
||||
can.core.Item(_list, function(key) { list.indexOf(key) == -1 && list.push(key) })
|
||||
var role = can.page.Append(can, target, [{view: aaa.ROLE, list: can.core.List(list, function(key) {
|
||||
var value = _list[key]; if (!value) { return }
|
||||
if (can.base.isIn(key, ctx.STYLE, mdb.ICONS)) { return }
|
||||
var value = _list[key]; if (!value) { return } if (can.base.isIn(key, ctx.STYLE, mdb.ICONS)) { return }
|
||||
return {text: [can.user.trans(can, key, value), "", key], onclick: function(event) {
|
||||
can.onexport.value(can, can.sup.current), can.onexport.index(can, can.sup.current, key), can.onmotion.select(can, role, html.SPAN, event.target)
|
||||
}}
|
||||
@ -162,6 +157,7 @@ Volcanos(chat.ONACTION, {
|
||||
sub.Option("school_name", "深圳中学")
|
||||
sub.Option("company_name", "云境互联")
|
||||
sub.Option("class_name", "初一二班")
|
||||
sub.Option("group_name", "爬山群")
|
||||
sub.Option("grade", "2024级")
|
||||
// sub.Option("company_name", "老邵木器加工")
|
||||
sub.Option("store_name", "老邵木器加工")
|
||||
@ -185,6 +181,10 @@ Volcanos(chat.ONEXPORT, {
|
||||
can.ui.mynotice && can.onimport.myNotice(can, value, can.ui.mynotice)
|
||||
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, value._role == "creator" || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0)
|
||||
can.onmotion.toggle(can, can.ui.myindex, !value.member_status || value.member_status == "normal")
|
||||
if (!can.onmotion.cache(can, function() { return value._uid }, can.ui.header) && value.auth_background) {
|
||||
can.page.Append(can, can.ui.header, [{img: value.auth_background}])
|
||||
can.page.ClassList.set(can, can._output, "background", !!can.ui.header.innerHTML)
|
||||
}
|
||||
},
|
||||
index: function(can, value, role) { role = role||value._role
|
||||
can.ui.role && can.onmotion.toggle(can, can.ui.role, value._role == "creator")
|
||||
|
@ -1,20 +1,14 @@
|
||||
{
|
||||
"portal": "用户场景",
|
||||
"placeCreate": "创建", "placeRemove": "删除", "placeAuth": "认证",
|
||||
"placeSearch": "搜索", "scanQRCode": "扫码",
|
||||
"portal": "用户场景", "placeCreate": "创建", "placeRemove": "删除",
|
||||
"credit": "用户名片", "member": "服务成员", "setting": "配置", "email": "邮箱配置",
|
||||
"qrcode": "场景码", "event": "事件流", "apply": "权限申请", "allow": "权限审批", "notice": "通知公告",
|
||||
"member": "场景成员",
|
||||
"credit": "用户名片",
|
||||
"setting": "配置", "email": "邮箱配置",
|
||||
"domain": "领域分类", "market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
|
||||
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过",
|
||||
"read": "已读", "done": "完成", "sticky": "置顶", "unSticky": "取消置顶",
|
||||
"autogen": "生成", "compile": "编译", "oauth": "授权", "project": "项目",
|
||||
"marketInsert": "推广", "commentCreate": "评论", "applyQRCode": "邀请码",
|
||||
"user": "用户信息", "city": "城市信息", "street": "街道信息", "school": "学校信息", "company": "公司信息",
|
||||
"auth": "认证",
|
||||
"authCreate": "认证申请",
|
||||
"authCity": "城市认证", "authPersonal": "个人认证", "authService": "服务认证", "authCompany": "公司认证",
|
||||
"auth": "认证", "authCreate": "认证申请", "authCity": "城市认证", "authPersonal": "个人认证", "authService": "服务认证", "authCompany": "公司认证",
|
||||
"icons": {
|
||||
"user": "https://img.icons8.com/officel/80/qr-code.png",
|
||||
"city": "https://img.icons8.com/officel/80/qr-code.png",
|
||||
@ -155,7 +149,10 @@
|
||||
},
|
||||
"member_status": {
|
||||
"normal": "正常",
|
||||
"disabled": "❌ 已禁用"
|
||||
"disabled": "❌ 已禁用",
|
||||
"style": {
|
||||
"disabled": "danger"
|
||||
}
|
||||
},
|
||||
"message_status": {
|
||||
"all": "全部",
|
||||
|
@ -11,7 +11,7 @@ type setting struct {
|
||||
Table
|
||||
recent recent
|
||||
service service
|
||||
order string `data:"102"`
|
||||
order string `data:"103"`
|
||||
role string `data:"leader,worker,server"`
|
||||
short string `data:"name"`
|
||||
field string `data:"name,type,help"`
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
|
||||
type Portal struct {
|
||||
guanlixitong.Portal
|
||||
placeCreate string `name:"placeCreate city_name* company_name* group_name* group_type*:select" role:"void"`
|
||||
placeCreate string `name:"placeCreate city_name* company_name* group_name* group_type:select" role:"void"`
|
||||
}
|
||||
|
||||
func init() { gonganxitong.PortalCmd(Portal{Portal: guanlixitong.NewPortal(userGroup{}, group{})}) }
|
||||
|
@ -22,6 +22,8 @@ const (
|
||||
AUTH_STATUS = "auth_status"
|
||||
AUTH_AVATAR = "auth_avatar"
|
||||
CERT_UID = "cert_uid"
|
||||
PLACE_NAME = "place_name"
|
||||
STREET_NAME = "street_name"
|
||||
COMPANY_UID = "company_uid"
|
||||
COMPANY_NAME = "company_name"
|
||||
CITY_UID = "city_uid"
|
||||
|
@ -13,11 +13,9 @@ import (
|
||||
|
||||
type profile struct {
|
||||
Auth
|
||||
order string `data:"3"`
|
||||
modify string `name:"modify info" role:"tech"`
|
||||
// modify string `name:"modify info" role:"leader,worker"`
|
||||
upload string `name:"upload" role:"tech"`
|
||||
// upload string `name:"upload" role:"leader,worker"`
|
||||
order string `data:"3"`
|
||||
modify string `name:"modify info" role:"void"`
|
||||
upload string `name:"upload" role:"void"`
|
||||
authList string `name:"authList" role:"void"`
|
||||
fromList string `name:"fromList" role:"void"`
|
||||
memberList string `name:"memberList" role:"void"`
|
||||
@ -42,8 +40,12 @@ func (s profile) List(m *ice.Message, arg ...string) {
|
||||
kit.If(!m.IsTech() && s.IsVisitor(m), func() { m.Action() }, func() { m.Action(s.Modify, s.Enter) })
|
||||
s.SelectJoinRecent(m, model.PLACE_UID)
|
||||
s.SelectJoinService(m)
|
||||
defer m.Echo(m.Append(model.CITY_NAME) + " " + m.Append(model.STREET_NAME) + " " + m.Append(model.PLACE_NAME))
|
||||
case AuthPersonal:
|
||||
s.SelectJoinUser(m)
|
||||
defer m.Echo(m.Append(model.NAME))
|
||||
default:
|
||||
defer m.Echo(m.Append(model.NAME))
|
||||
}
|
||||
s.RewriteAppend(m)
|
||||
m.EchoQRCode(s.Link(m, arg[0], m.PrefixKey()))
|
||||
|
@ -1,5 +1,6 @@
|
||||
Volcanos(chat.ONIMPORT, {
|
||||
_init: function(can, msg) { msg.Option("_share_title", msg.Append(mdb.NAME))
|
||||
_init: function(can, msg) {
|
||||
msg.Option("_share_title", msg.Append(mdb.NAME)), msg.Option("_share_content", msg.Append(mdb.INFO)), msg.Option("_share_icons", msg.Append(aaa.AVATAR))
|
||||
// if (!can.base.isIn(msg.Option(USER_ROLE), "1", "2", "3")) { delete(can.onaction.updateAvatar), delete(can.onaction.updateBackground) }
|
||||
can.ui = can.page.Appends(can, can._output, [html.HEAD, html.LIST, "from"])
|
||||
msg.Table(function(value) {
|
||||
@ -12,28 +13,18 @@ Volcanos(chat.ONIMPORT, {
|
||||
{view: html.STATUS, list: [value.info]},
|
||||
], function() {})])
|
||||
})
|
||||
var cmd = msg.Append(AUTH_TYPE) == "personal"? can.onimport.serviceList(can, msg): msg.Append(AUTH_TYPE) == "service"? can.onimport.memberList(can, msg): can.onimport.authList(can, msg)
|
||||
can.onimport.myTitle(can, "My Count", "成员列表", can.ui.list)
|
||||
can.onimport.myTitle(can, "My Count", "认证机构", can.ui.from)
|
||||
can.onimport.fromList(can, msg, can.ui.from)
|
||||
can.onappend.board(can, msg)
|
||||
switch (msg.Append(AUTH_TYPE)) {
|
||||
case "root": can.onimport.myTitle(can, "My City", "城市列表", can.ui.list); break
|
||||
case "city": can.onimport.myTitle(can, "My Company", "组织列表", can.ui.list); break
|
||||
case "service": can.onimport.myTitle(can, "My Member", "成员列表", can.ui.list); break
|
||||
default: can.onimport.myTitle(can, "My Auth", "服务列表", can.ui.list)
|
||||
} can.onimport.myTitle(can, "My From", "认证机构", can.ui.from)
|
||||
msg.Append(AUTH_TYPE) == "personal"? can.onimport.serviceList(can, msg): msg.Append(AUTH_TYPE) == "service"? can.onimport.memberList(can, msg): can.onimport.authList(can, msg)
|
||||
can.onimport.fromList(can, msg, can.ui.from), can.onappend.board(can, msg)
|
||||
},
|
||||
myTitle: function(can, name, help, target) {
|
||||
can.page.Append(can, target, [{view: html.TITLE, list: [{text: can.user.trans(can, name, help)}]}])
|
||||
},
|
||||
fromList: function(can, msg, target) {
|
||||
can.runAction(can.request({}, {}), "fromList", [msg.Append("from_uid")], function(msg) {
|
||||
if (msg.Length() == 0) { return can.onmotion.hidden(can, target) }
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
return [
|
||||
{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, value.service_name]},
|
||||
]
|
||||
}, function(event, value) {
|
||||
can.Option(AUTH_UID, value.uid), can.Update(event)
|
||||
}, target)
|
||||
})
|
||||
},
|
||||
authList: function(can, msg) {
|
||||
can.runAction(can.request({}, {auth_uid: msg.Append(UID)}), "authList", [], function(msg) {
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
@ -76,11 +67,24 @@ Volcanos(chat.ONIMPORT, {
|
||||
}, can.ui.list)
|
||||
})
|
||||
},
|
||||
fromList: function(can, msg, target) {
|
||||
can.runAction(can.request({}, {}), "fromList", [msg.Append("from_uid")], function(msg) {
|
||||
if (msg.Length() == 0) { return can.onmotion.hidden(can, target) }
|
||||
can.onimport.myView(can, msg, function(value) {
|
||||
return [
|
||||
{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, value.service_name]},
|
||||
]
|
||||
}, function(event, value) {
|
||||
can.Option(AUTH_UID, value.uid), can.Update(event)
|
||||
}, target)
|
||||
})
|
||||
},
|
||||
})
|
||||
Volcanos(chat.ONACTION, {
|
||||
enter: function(event, can) { var msg = can.request(event, {
|
||||
nodename: can._msg.Append("nodename"), index: can._msg.Append("index"), place_uid: can._msg.Append("place_uid"),
|
||||
}); can.onimport.myPlugin(can, {space: msg.Option("nodename"), index: msg.Option("index"), args: [msg.Option("place_uid")]}) },
|
||||
enter: function(event, can) { var msg = can.request(event)
|
||||
can.onimport.myPlugin(can, {space: msg.Option("nodename"), index: msg.Option("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) },
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user