小店商品列表shujuok

This commit is contained in:
yml2213
2026-08-08 17:40:16 +08:00
parent 22dc50196f
commit 379a9d58d3
12 changed files with 2733 additions and 27 deletions
+21 -1
View File
@@ -23,6 +23,10 @@ type Activity struct {
StoreHomeURL string
CSRFURL string
IsXiaodian bool // 和平小店商品列表使用 QQ 道具接口和响应格式。
ActID string // 和平小店道具活动 ID。
RoleParamURL string // 和平小店 H5 临时授权接口。
RoleURL string // 和平小店角色解析接口。
BatchLimitURL string
PreExchangeURL string
@@ -89,9 +93,25 @@ var peacematch = &Activity{
CTNURL: douyuBase + "/wgapi/livenc/liveweb/csrfApi/getCsrfCookie",
}
// xiaodian 和平小店。商品查询前自动从斗鱼 Cookie 获取角色上下文。
var xiaodian = &Activity{
ID: "xiaodian",
DisplayName: "和平小店",
RoomID: "9263298",
ActAlias: "20260623KDQFH",
ActID: "46195",
BaseURL: "https://app.daoju.qq.com",
ShopReferer: "https://app.daoju.qq.com/",
StoreHomeURL: "https://apps.game.qq.com/daoju/v3/recommend_xn_live_cjm/common",
RoleParamURL: "https://www.douyu.com/japi/carnival/nc/txEmbed/getIframeUrl",
RoleURL: "https://apps.game.qq.com/daoju/igw/live",
IsXiaodian: true,
}
var registry = map[string]*Activity{
peace.ID: peace,
peacematch.ID: peacematch,
xiaodian.ID: xiaodian,
}
// DefaultActivityID 默认活动,新分支默认启用「电竞手册」。
@@ -99,7 +119,7 @@ const DefaultActivityID = "peacematch"
// List 返回所有注册活动,按注册顺序(精英手册在前)。
func List() []*Activity {
return []*Activity{peace, peacematch}
return []*Activity{peace, peacematch, xiaodian}
}
// Get 按 ID 获取活动;不存在时返回 nil。