This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-10-03 19:08:39 +08:00
parent aa3b2f1e17
commit 9752e885bd
12 changed files with 41 additions and 34 deletions

View File

@ -135,7 +135,11 @@ func (s Table) ValueList(m *ice.Message, arg []string, fields ...ice.Any) *ice.M
}
if s.ValueModel(m, s.ValueList, arg...); len(arg) == 1 {
s.UserPlaceInit(m)
if s.IsLeader(m) {
s.Button(m, "")
} else {
m.Echo("没有数据").Action()
}
}
return s.SelectJoinUser(m)
}

View File

@ -25,6 +25,10 @@ func (s credit) List(m *ice.Message, arg ...string) {
m.ProcessField(api.RENZHENGSHOUQUAN_PROFILE, msg.Append(model.AUTH_UID))
return
}
if !s.IsWorker(m) {
m.Echo("本服务暂未申请认证")
return
}
m.SetResult().EchoInfoButton("请申请服务认证", s.AuthService)
msg = m.Cmd(s.Street, s.Select, model.UID, msg.Append(s.Keys(s.Street, model.UID)))

View File

@ -11,6 +11,9 @@ type member struct {
Tables
user user
order string `data:"102"`
remove string `name:"remove" role:"void"`
enable string `name:"enable" role:"void"`
disable string `name:"disable" role:"void"`
}
func (s member) Remove(m *ice.Message, arg ...string) {

View File

@ -8,9 +8,6 @@ Volcanos(chat.ONIMPORT, {
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),
value.member_status != "normal" && can.onimport.textView(can, value, "member_status"),
]},
{view: html.STATUS, list: [value.user_info]},
]
})

View File

@ -16,14 +16,15 @@ $output { background-color:var(--plugin-bg-color); }
$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.code { margin-bottom:240px; display:flex; flex-direction:column; align-items:center; }
$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.code { margin-top:60px; margin-bottom:240px; display:flex; flex-direction:column; align-items:center; }
$output>div>div.list.mycount { min-height:105px; }
$output>div>div.list.mynotice { cursor:pointer; }
$output>div>div.list.mynotice:not(.hide) { display:flex; 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; }
@ -58,7 +59,7 @@ $output div.item.card div.title { width:100%; display:flex; align-items:center;
$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 div.status span { word-break:break-all; white-space:pre; }
$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); }
$action div.item.notice input[type=button] { border:var(--box-notice); color:var(--notice-bg-color); }
@ -66,21 +67,13 @@ $action div.item.danger input[type=button] { border:var(--box-danger); color:var
$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; }
body.mobile $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.status { 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; }
$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 span.status.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; }

View File

@ -145,7 +145,9 @@ 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_NAME, model.AUTH_INFO, model.AUTH_AVATAR, model.AUTH_BACKGROUND, model.DASHBOARD_UID,
model.CITY_NAME, s.Keys(s.Street, model.NAME),
model.MEMBER_STATUS,
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)))

View File

@ -52,10 +52,12 @@ Volcanos(chat.ONIMPORT, {
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 { 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",
PLACE_UID, PLACE_NAME, PLACE_TYPE, USER_PLACE_ROLE, STREET_NAME, CITY_NAME,
"member_status",
"auth_status", "auth_name", "auth_info", "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.onappend.board(can, msg, can.ui.output), can.onexport.value(can, can.sup.current)
can.user.agent.init(can, [msg.Option(CITY_NAME), msg.Option(STREET_NAME), msg.Option("auth_info")].join(" "), msg.Option("auth_avatar"))
}
},
@ -176,11 +178,12 @@ Volcanos(chat.ONEXPORT, {
can.onexport.place(can, value._uid), can.onexport.hash(can, value._uid), can.onexport.title(can, value._name, can.ConfHelp())
can.user.agent.init(can, value.city_name+" "+value._street)
can.page.Select(can, can.ui._target, "div.item.card.uid-"+value._uid, function(item) { can.onmotion.select(can, can.ui._target, html.DIV_ITEM, item) })
var status = !value.member_status || value.member_status == "normal"
can.ui.myinit && can.onimport.myInit(can, can._index_msg, value, can.ui.myinit)
can.ui.mycount && can.onimport.myCount(can, value, can.ui.mycount)
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")
can.ui.myallow && can.onmotion.toggle(can, can.ui.myallow, status && (value._role == "creator" || can.page.Select(can, can.ui.myallow, "div.item.index.role."+value._role).length > 0))
can.ui.myindex && can.onmotion.toggle(can, can.ui.myindex, status)
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)

View File

@ -1,6 +1,6 @@
{
"portal": "用户场景", "placeCreate": "创建", "placeRemove": "删除",
"credit": "用户名片", "member": "服务成员", "setting": "配置", "email": "邮箱配置",
"credit": "用户名片", "member": "组织成员", "setting": "服务配置", "email": "邮箱配置",
"qrcode": "场景码", "event": "事件流", "apply": "权限申请", "allow": "权限审批", "notice": "通知公告",
"domain": "领域分类", "market": "人民广场", "message": "消息待办", "recent": "最近访问", "service": "服务发现", "support": "客服支持",
"cancel": "取消", "submit": "提交", "finish": "完成", "reject": "驳回", "approve": "通过",
@ -59,6 +59,7 @@
"auth_type": "认证类型",
"auth_status": "认证状态",
"auth_avatar": "认证头像",
"auth_background": "认证背景",
"qrcode_type": "链接类型",
"apply_status": "申请状态",
"allow_status": "审批状态",

View File

@ -2,10 +2,9 @@ Volcanos(chat.ONIMPORT, {
_init: function(can, msg) {
can.onimport.myView(can, msg, function(value) { if (value.score > 0) { value._style = ["sticky"] }
value.icons = can.misc.Resource(can, value.service_icon.split("?")[0], value.space)
value._street = value.street_name
return [
{view: html.TITLE, list: [value.place_name, can.onimport.authView(can, value), can.onimport.timeView(can, value)]},
{view: html.STATUS, list: [can.onimport.cityView(can, value), can.onimport.streetView(can, value), value.service_name]},
{view: html.STATUS, list: [value.city_name, value.street_name, value.service_name]},
]
}, function(event, value) { can.onaction._goback(event, function() {
can.onimport.myPlugin(can, {space: value.space, index: value.index, args: [value.place_uid]})

View File

@ -6,7 +6,7 @@ type activity struct {
Table
fields string `data:"title,content,user_uid"`
create string `name:"create title* content*" role:"leader"`
modify string `name:"modify title content" role:"leader"`
modify string `name:"modify title* content*" role:"leader"`
remove string `name:"remove" role:"leader"`
}

View File

@ -1,5 +1,5 @@
{
"portal": "活动组织", "member": "组织成员",
"portal": "活动组织",
"activity": "活动安排",
"icons": {
"activity": "https://img.icons8.com/officel/80/activity-grid.png"

View File

@ -33,11 +33,11 @@ func (s profile) Upload(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])
kit.If(!m.IsTech() && s.IsVisitor(m), func() { m.Action() }, func() { m.Action(s.Modify) })
kit.If(s.IsVisitor(m), func() { m.Action() }, func() { m.Action(s.Modify) })
}
switch AuthType(kit.Int(m.Append(model.AUTH_TYPE))) {
case AuthService:
kit.If(!m.IsTech() && s.IsVisitor(m), func() { m.Action() }, func() { m.Action(s.Modify, s.Enter) })
kit.If(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))
@ -75,11 +75,12 @@ func (s profile) AuthList(m *ice.Message, arg ...string) {
s.RewriteAppend(m)
}
func (s profile) MemberList(m *ice.Message, arg ...string) {
user_uid := m.Option(model.USER_UID)
msg := s.Select(m.Spawn(), model.UID, m.Option(model.AUTH_UID))
service := s.Table.ServiceList(m, msg.Append(model.PLACE_UID), msg.Append(model.SERVICE_UID))
m.Cmdy(web.SPACE, service.Append(model.SPACE), service.Append(model.INDEX), ctx.ACTION, m.ActionKey(), msg.Append(model.PLACE_UID))
m.Table(func(value ice.Maps) {
if value[model.AUTH_STATUS] == "" && value[model.USER_UID] == m.Option(model.USER_UID) {
if value[model.AUTH_STATUS] == "" && value[model.USER_UID] == user_uid {
m.PushButton(s.AuthPersonal)
} else {
m.PushButton()