Skip to content

Commit

Permalink
Fix api GetWearedMedal 405
Browse files Browse the repository at this point in the history
  • Loading branch information
qydysky committed Jun 5, 2024
1 parent 6d89983 commit dc5ec8f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions F/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -1104,9 +1104,9 @@ func Get_list_in_room(RoomID, TargetID int) (array []struct {
}

// 获取当前佩戴的牌子
func Get_weared_medal() (item J.GetWearedMedal_Data) {
func Get_weared_medal(uid, upUid int) (item J.GetWearedMedal_Data) {

apilog := apilog.Base_add(`获取牌子`)
apilog := apilog.Base_add(`获取佩戴牌子`)
//验证cookie
if missKey := CookieCheck([]string{
`bili_jct`,
Expand All @@ -1117,7 +1117,7 @@ func Get_weared_medal() (item J.GetWearedMedal_Data) {
return
}

if err, res := biliApi.GetWearedMedal(); err != nil {
if err, res := biliApi.GetWearedMedal(uid, upUid); err != nil {
apilog.L(`E: `, err)
} else {
item.Roominfo.RoomID = res.RoomID
Expand Down Expand Up @@ -1156,7 +1156,7 @@ func (c *GetFunc) CheckSwitch_FansMedal() (missKey []string) {
return true
})
{ //获取当前牌子,验证是否本直播间牌子
res := Get_weared_medal()
res := Get_weared_medal(c.Uid, c.UpUid)

c.Wearing_FansMedal = res.Roominfo.RoomID //更新佩戴信息
if res.TargetID == c.UpUid {
Expand Down
2 changes: 1 addition & 1 deletion F/biliApiInterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ type biliApiInter interface {
ImgURL string
SubURL string
}) (err error, queryEnc string)
GetWearedMedal() (err error, res struct {
GetWearedMedal(uid, upUid int) (err error, res struct {
TodayIntimacy int
RoomID int
TargetID int
Expand Down
2 changes: 1 addition & 1 deletion Reply/F.go
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ func Entry_danmu() {
return
}
if v, _ := c.C.K_v.LoadV(`进房弹幕_仅发首日弹幕`).(bool); v {
res := F.Get_weared_medal()
res := F.Get_weared_medal(c.C.Uid, c.C.UpUid)
if res.TodayIntimacy > 0 {
flog.L(`T: `, `今日已发弹幕`)
return
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (

require (
github.com/google/uuid v1.6.0
github.com/qydysky/biliApi v0.0.0-20240513191013-9035390b13c0
github.com/qydysky/biliApi v0.0.0-20240605123327-461cdf520458
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdh
github.com/ncruces/go-strftime v0.1.9/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/qydysky/biliApi v0.0.0-20240513191013-9035390b13c0 h1:mPP9ElJlVbXG7st/11LrIRw8zF8lEzagalzO4Nz9EHM=
github.com/qydysky/biliApi v0.0.0-20240513191013-9035390b13c0/go.mod h1:om024vfxALQ5vxsbaGoMm8IS0esLYBnEOpJI8FsGoDg=
github.com/qydysky/biliApi v0.0.0-20240605123327-461cdf520458 h1:dZ3W6FNonYAvduyjaaBW/1cYyZSblunkbRUv+oO5nJU=
github.com/qydysky/biliApi v0.0.0-20240605123327-461cdf520458/go.mod h1:om024vfxALQ5vxsbaGoMm8IS0esLYBnEOpJI8FsGoDg=
github.com/qydysky/part v0.28.20240522125924 h1:l1FuWfh8tQpfOIfnI2LJsoBDfMdrseh27wquWj1nq+Y=
github.com/qydysky/part v0.28.20240522125924/go.mod h1:nZgAUD7e70EN+Zxe1pie3J4j0/d8dr0/y4AiZJwcsbo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
Expand Down

0 comments on commit dc5ec8f

Please sign in to comment.