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
e4c68f16
Commit
e4c68f16
authored
Jun 05, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/cp-new' into feature/3.9.0
parents
264560e6
4a8e3f42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
space.go
cv/cp_cv/space.go
+10
-8
space.go
route/cp_r/space.go
+2
-0
No files found.
cv/cp_cv/space.go
View file @
e4c68f16
...
...
@@ -32,8 +32,10 @@ type CvCpLevel struct {
// 资源等级
type
CvResLevel
struct
{
Level
cp_e
.
CpLevel
`json:"level"`
// 等级
Icon
string
`json:"icon"`
// 等级icon图
Level
cp_e
.
CpLevel
`json:"level"`
// 等级
Icon
string
`json:"icon"`
// 等级icon图
StartPoints
uint32
`json:"startPoints"`
// 上个等级所需CP值
EndPoints
uint32
`json:"endPoints,omitempty"`
// 下个等级所需CP值
}
// 特权信息
...
...
@@ -57,12 +59,12 @@ type CvSpace struct {
}
var
CvResLevelList
=
[]
CvResLevel
{
{
cp_e
.
CpLevel0
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel0
]},
{
cp_e
.
CpLevel1
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel1
]},
{
cp_e
.
CpLevel2
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel2
]},
{
cp_e
.
CpLevel3
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel3
]},
{
cp_e
.
CpLevel4
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel4
]},
{
cp_e
.
CpLevel5
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel5
]},
{
cp_e
.
CpLevel0
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel0
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel0
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel1
]
},
{
cp_e
.
CpLevel1
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel1
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel1
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel2
]
},
{
cp_e
.
CpLevel2
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel2
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel2
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel3
]
},
{
cp_e
.
CpLevel3
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel3
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel3
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel4
]
},
{
cp_e
.
CpLevel4
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel4
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel4
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel5
]
},
{
cp_e
.
CpLevel5
,
cp_e
.
CpLevelIcon
[
cp_e
.
CpLevel5
]
,
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevel5
],
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevelMax
]
},
}
var
(
...
...
route/cp_r/space.go
View file @
e4c68f16
...
...
@@ -76,6 +76,8 @@ func CpSpace(c *gin.Context) (*mycontext.MyContext, error) {
}
if
cpLevel
!=
cp_e
.
CpLevelMax
{
nextPoints
=
cp_e
.
CpLevelPoints
[
cpLevel
+
1
]
}
else
{
nextPoints
=
cp_e
.
CpLevelPoints
[
cp_e
.
CpLevelMax
]
}
userPrivileges
,
err
:=
cp_m
.
MGetUserSvipPrivilege
(
model
,
[]
uint64
{
userId
})
if
err
!=
nil
{
...
...
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