Skip to content

Commit

Permalink
更改 获取评论的默认分类方式
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaoMengXinX committed Oct 19, 2021
1 parent 4021efd commit a8d2c61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions api/Comment.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type GetCommentConfig struct {
PageNo int
// PageSize 分页参数,每页多少条数据,默认20
PageSize int
// SortType 排序方式,1:按推荐排序,2:按热度排序,3:按时间排序
// SortType 排序方式,99:按推荐排序,2:按热度排序,3:按时间排序,默认为99
SortType int
// Cursor 当sortType为3时且页数不是第一页时需传入,值为上一条数据的time
Cursor int
Expand Down Expand Up @@ -127,7 +127,7 @@ func CreateGetCommentJson(config GetCommentConfig) string {
reqBody.PageSize = config.PageSize
}
if config.SortType == 0 {
reqBody.SortType = 1
reqBody.SortType = 99
} else {
reqBody.SortType = config.SortType
}
Expand Down
2 changes: 1 addition & 1 deletion utils/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func CreateNewRequest(data string, url string, options RequestData) (answer stri
_, ok := cookie["MUSIC_U"]
if !ok {
_, ok := cookie["MUSIC_A"]
if ok {
if !ok {
cookie["MUSIC_A"] = "4ee5f776c9ed1e4d5f031b09e084c6cb333e43ee4a841afeebbef9bbf4b7e4152b51ff20ecb9e8ee9e89ab23044cf50d1609e4781e805e73a138419e5583bc7fd1e5933c52368d9127ba9ce4e2f233bf5a77ba40ea6045ae1fc612ead95d7b0e0edf70a74334194e1a190979f5fc12e9968c3666a981495b33a649814e309366"
}
}
Expand Down

0 comments on commit a8d2c61

Please sign in to comment.