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
ed06aa7a
Commit
ed06aa7a
authored
Jun 21, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
低版本用30页面
parent
171edf2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
rank.go
route/cp_r/rank.go
+7
-0
No files found.
route/cp_r/rank.go
View file @
ed06aa7a
...
@@ -5,6 +5,7 @@ import (
...
@@ -5,6 +5,7 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/mycontext"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/utils"
"github.com/gin-gonic/gin"
"github.com/gin-gonic/gin"
"github.com/jinzhu/now"
"github.com/jinzhu/now"
"hilo-user/_const/enum/cp_e"
"hilo-user/_const/enum/cp_e"
...
@@ -40,6 +41,12 @@ func CpRank(c *gin.Context) (*mycontext.MyContext, error) {
...
@@ -40,6 +41,12 @@ func CpRank(c *gin.Context) (*mycontext.MyContext, error) {
if
pageReq
.
PageIndex
==
0
{
if
pageReq
.
PageIndex
==
0
{
pageReq
.
PageIndex
=
1
pageReq
.
PageIndex
=
1
}
}
appVersion
,
deviceType
:=
c
.
GetHeader
(
mycontext
.
APP_VERSION
),
c
.
GetHeader
(
mycontext
.
DEVICETYPE
)
if
deviceType
==
"android"
{
if
lower
,
_
:=
utils
.
CompareVersion
(
appVersion
,
fmt
.
Sprintf
(
"<= %s"
,
"3.9.0"
));
lower
{
pageReq
.
PageSize
=
30
}
}
queryType
:=
c
.
Param
(
"queryType"
)
queryType
:=
c
.
Param
(
"queryType"
)
if
queryType
!=
"day"
&&
queryType
!=
"week"
&&
queryType
!=
"month"
{
if
queryType
!=
"day"
&&
queryType
!=
"week"
&&
queryType
!=
"month"
{
return
myCtx
,
bizerr
.
InvalidParameter
return
myCtx
,
bizerr
.
InvalidParameter
...
...
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