Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweijian
hilo-user
Commits
823302d3
Commit
823302d3
authored
Jun 14, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/cp-new' into feature/3.9.0
parents
d6d42fee
baa1f37b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
space.go
cv/cp_cv/space.go
+20
-8
No files found.
cv/cp_cv/space.go
View file @
823302d3
...
...
@@ -50,6 +50,7 @@ type CvPrivilege struct {
Icon
string
`json:"icon"`
// 图标
CanSwitch
bool
`json:"canSwitch"`
// 能否开关
UserSwitch
bool
`json:"userSwitch"`
// 用户开关
LevelList
[]
cp_e
.
CpLevel
`json:"levelList"`
// 特权->level的反向索引
}
// cp空间页
...
...
@@ -71,14 +72,14 @@ var CvResLevelList = []CvResLevel{
}
var
(
CvPrivilege1
=
CvPrivilege
{
cp_e
.
CpPrivilegeSpace
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeSpace
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeSpace
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeSpace
],
false
,
false
}
CvPrivilege2
=
CvPrivilege
{
cp_e
.
CpPrivilegeBanner
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeBanner
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeBanner
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeBanner
],
false
,
false
}
CvPrivilege3
=
CvPrivilege
{
cp_e
.
CpPrivilegeMedal
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeMedal
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeMedal
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeMedal
],
false
,
false
}
CvPrivilege4
=
CvPrivilege
{
cp_e
.
CpPrivilegeCert
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeCert
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeCert
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeCert
],
false
,
false
}
CvPrivilege5
=
CvPrivilege
{
cp_e
.
CpPrivilegeRoomEffect
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeRoomEffect
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeRoomEffect
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeRoomEffect
],
true
,
false
}
CvPrivilege6
=
CvPrivilege
{
cp_e
.
CpPrivilegeHeadwear
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeHeadwear
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeHeadwear
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeHeadwear
],
false
,
false
}
CvPrivilege7
=
CvPrivilege
{
cp_e
.
CpPrivilegeActiveProfile
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeActiveProfile
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeActiveProfile
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeActiveProfile
],
true
,
false
}
CvPrivilege8
=
CvPrivilege
{
cp_e
.
CpPrivilegeMicEffect
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeMicEffect
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeMicEffect
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeMicEffect
],
false
,
false
}
CvPrivilege1
=
CvPrivilege
{
cp_e
.
CpPrivilegeSpace
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeSpace
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeSpace
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeSpace
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeSpace
]
}
CvPrivilege2
=
CvPrivilege
{
cp_e
.
CpPrivilegeBanner
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeBanner
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeBanner
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeBanner
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeBanner
]
}
CvPrivilege3
=
CvPrivilege
{
cp_e
.
CpPrivilegeMedal
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeMedal
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeMedal
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeMedal
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeMedal
]
}
CvPrivilege4
=
CvPrivilege
{
cp_e
.
CpPrivilegeCert
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeCert
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeCert
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeCert
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeCert
]
}
CvPrivilege5
=
CvPrivilege
{
cp_e
.
CpPrivilegeRoomEffect
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeRoomEffect
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeRoomEffect
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeRoomEffect
],
true
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeRoomEffect
]
}
CvPrivilege6
=
CvPrivilege
{
cp_e
.
CpPrivilegeHeadwear
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeHeadwear
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeHeadwear
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeHeadwear
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeHeadwear
]
}
CvPrivilege7
=
CvPrivilege
{
cp_e
.
CpPrivilegeActiveProfile
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeActiveProfile
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeActiveProfile
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeActiveProfile
],
true
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeActiveProfile
]
}
CvPrivilege8
=
CvPrivilege
{
cp_e
.
CpPrivilegeMicEffect
,
cp_e
.
CpPrivilegeNameMsgId
[
cp_e
.
CpPrivilegeMicEffect
],
""
,
cp_e
.
CpPrivilegeDescMsgId
[
cp_e
.
CpPrivilegeMicEffect
],
""
,
cp_e
.
CpPrivilegeIcon
[
cp_e
.
CpPrivilegeMicEffect
],
false
,
false
,
CpPrivilegeLevelList
[
cp_e
.
CpPrivilegeMicEffect
]
}
)
var
CpLevelPrivilegeList
=
map
[
cp_e
.
CpLevel
][]
CvPrivilege
{
...
...
@@ -90,6 +91,17 @@ var CpLevelPrivilegeList = map[cp_e.CpLevel][]CvPrivilege{
cp_e
.
CpLevel5
:
{
CvPrivilege1
,
CvPrivilege2
,
CvPrivilege3
,
CvPrivilege4
,
CvPrivilege5
,
CvPrivilege6
,
CvPrivilege7
,
CvPrivilege8
},
}
var
CpPrivilegeLevelList
=
map
[
cp_e
.
CpPrivilege
][]
cp_e
.
CpLevel
{
cp_e
.
CpPrivilegeSpace
:
{
cp_e
.
CpLevel0
,
cp_e
.
CpLevel1
,
cp_e
.
CpLevel2
,
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeBanner
:
{
cp_e
.
CpLevel1
,
cp_e
.
CpLevel2
,
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeMedal
:
{
cp_e
.
CpLevel1
,
cp_e
.
CpLevel2
,
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeCert
:
{
cp_e
.
CpLevel1
,
cp_e
.
CpLevel2
,
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeRoomEffect
:
{
cp_e
.
CpLevel2
,
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeHeadwear
:
{
cp_e
.
CpLevel3
,
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeActiveProfile
:
{
cp_e
.
CpLevel4
,
cp_e
.
CpLevel5
},
cp_e
.
CpPrivilegeMicEffect
:
{
cp_e
.
CpLevel5
},
}
func
CopyCpLevelPrivilegeList
(
Level
cp_e
.
CpLevel
,
lang
string
)
[]
CvPrivilege
{
privileges
:=
make
([]
CvPrivilege
,
len
(
CpLevelPrivilegeList
[
Level
]))
copy
(
privileges
,
CpLevelPrivilegeList
[
Level
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment