mirror of
https://shylinux.com/x/community
synced 2025-07-01 13:14:44 +08:00
add some
This commit is contained in:
parent
a5bc647822
commit
b7f54a012a
@ -23,6 +23,7 @@ type member struct {
|
||||
main string `name:"main" help:"主页" role:"void"`
|
||||
setCookie string `name:"setCookie" help:"切换"`
|
||||
setInfo string `name:"setInfo info" help:"备注" role:"worker"`
|
||||
setScore string `name:"setScore score" help:"打分" role:"leader"`
|
||||
setLanguage string `name:"setLanguage language" help:"语言" role:"worker"`
|
||||
sessList string `name:"sessList" role:"leader"`
|
||||
userInfo string `name:"userInfo" help:"个人主页" role:"void"`
|
||||
@ -51,11 +52,11 @@ func (s member) Enable(m *ice.Message, arg ...string) {
|
||||
func (s member) List(m *ice.Message, arg ...string) {
|
||||
USER_PLACE_ROLE := s.Keys(s.UserPlace, model.ROLE)
|
||||
user_uid, isLeader, isCreator := m.Option(model.USER_UID), s.IsLeader(m), s.IsCreator(m)
|
||||
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, 3000)
|
||||
s.FieldsWithCreatedAT(m, s.UserPlace, s.AS(s.Key(s.UserPlace, model.STATUS), model.MEMBER_STATUS), USER_PLACE_ROLE, model.SCORE, model.INFO, model.USER_UID).Limit(m, 3000)
|
||||
if len(arg) == 1 {
|
||||
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.SCORE, model.AUTH_STATUS, model.CREATED_AT), ice.INT, ice.INT, ice.INT_R, ice.INT, ice.STR)
|
||||
} 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()
|
||||
} else {
|
||||
@ -82,6 +83,9 @@ func (s member) List(m *ice.Message, arg ...string) {
|
||||
} else {
|
||||
button = append(button, s.Main)
|
||||
}
|
||||
if isLeader {
|
||||
button = append(button, s.SetScore)
|
||||
}
|
||||
if value[model.USER_UID] == user_uid || isLeader {
|
||||
button = append(button, s.SetInfo)
|
||||
}
|
||||
@ -135,6 +139,9 @@ func (s member) Auth(m *ice.Message, arg ...string) {
|
||||
func (s member) Main(m *ice.Message, arg ...string) {
|
||||
m.ProcessField(api.RENZHENGSHOUQUAN_PORTAL, []string{m.Option(model.AUTH_UID)})
|
||||
}
|
||||
func (s member) SetScore(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, s.Modify, arg)
|
||||
}
|
||||
func (s member) SetInfo(m *ice.Message, arg ...string) {
|
||||
m.Cmdy(s.UserPlace, s.Modify, arg)
|
||||
}
|
||||
|
@ -5,7 +5,8 @@ Volcanos(chat.ONIMPORT, {
|
||||
value._style = [value[USER_PLACE_ROLE], value.member_status, value.who,]
|
||||
return [
|
||||
{view: html.TITLE, list: [value.user_name,
|
||||
can.onimport.authView(can, value), can.onimport.textView(can, value, USER_PLACE_ROLE),
|
||||
can.onimport.authView(can, value), can.onimport.unitView(can, value, "score", "星"),
|
||||
can.onimport.textView(can, value, USER_PLACE_ROLE),
|
||||
value.member_status != "normal" && can.onimport.textView(can, value, "member_status"),
|
||||
]},
|
||||
value.location && {view: html.STATUS, list: [value.location, value.system]},
|
||||
|
@ -46,7 +46,7 @@ func (s Portal) PlaceList(m *ice.Message, arg ...string) *ice.Message {
|
||||
s.Tables(m, s.Place).FieldsWithCreatedAT(m, s.UserPlace,
|
||||
model.AUTH_UID, model.AUTH_NAME, model.AUTH_INFO, model.AUTH_AVATAR,
|
||||
model.AUTH_TYPE, model.AUTH_STATUS, model.USER_AUTH_ROLE,
|
||||
model.SCORE,
|
||||
s.Key(s.Place, model.SCORE),
|
||||
)
|
||||
if len(arg) == 1 {
|
||||
m.Cmdy(s.UserPlace, s.Table.Select, s.Key(s.UserPlace, model.USER_UID), arg[0])
|
||||
|
Loading…
x
Reference in New Issue
Block a user