fix: 时间校准接口全局复用旧 peace/storedetail,修正活动名称
- 从 Activity 结构体移除 TimeAPIURL 字段,时间校准与活动无关, 统一用 constants.DefaultTimeAPI(peace/storedetail 能稳定返回 currentTime) - 旧活动 peace DisplayName 从"和平手册"修正为"精英手册" - 更改项目默认端口避免冲突:Vite 5173→15173,Wails dev 34115→34215
This commit is contained in:
@@ -29,13 +29,13 @@ type DouyuClient struct {
|
||||
}
|
||||
|
||||
// New 创建斗鱼客户端。act 决定使用哪个活动的接口参数;
|
||||
// timeAPIURL 为空时回退到 act.TimeAPIURL。
|
||||
// timeAPIURL 为空时回退到 constants.DefaultTimeAPI(全局共享的服务端时间接口)。
|
||||
func New(act *activity.Activity, timeAPIURL string, tr *trace.Recorder) *DouyuClient {
|
||||
if act == nil {
|
||||
act = activity.Default()
|
||||
}
|
||||
if timeAPIURL == "" {
|
||||
timeAPIURL = act.TimeAPIURL
|
||||
timeAPIURL = constants.DefaultTimeAPI
|
||||
}
|
||||
return &DouyuClient{
|
||||
Activity: act,
|
||||
|
||||
Reference in New Issue
Block a user