From 24aa3dd71aaef8003fc44cc9145ecac795a36fce Mon Sep 17 00:00:00 2001 From: lixiangwuxian Date: Sat, 8 Mar 2025 19:28:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20BeatLeader=20?= =?UTF-8?q?=E6=9C=80=E8=BF=91=E6=88=90=E7=BB=A9=E8=8E=B7=E5=8F=96=E7=9A=84?= =?UTF-8?q?=20JSON=20=E8=A7=A3=E6=9E=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/beatleader/bind_bl.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/service/beatleader/bind_bl.go b/service/beatleader/bind_bl.go index 19bd78a..4f0680a 100644 --- a/service/beatleader/bind_bl.go +++ b/service/beatleader/bind_bl.go @@ -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{