fix: 修复 BeatLeader 最近成绩获取的 JSON 解析逻辑
This commit is contained in:
parent
bfac7dfa59
commit
24aa3dd71a
@ -332,11 +332,14 @@ func (bl *blQuery) GetRecentScores(count int, qqId string) ([]RecordDataLite, er
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var scores []ScoreData
|
||||
err = json.Unmarshal(body, &scores)
|
||||
var response struct {
|
||||
Data []ScoreData `json:"data"`
|
||||
}
|
||||
err = json.Unmarshal(body, &response)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
scores := response.Data
|
||||
records := make([]RecordDataLite, 0)
|
||||
for _, score := range scores {
|
||||
dataLite := RecordDataLite{
|
||||
|
Loading…
x
Reference in New Issue
Block a user