This commit is contained in:
2026-01-29 15:03:42 +08:00
7 changed files with 493 additions and 35 deletions

View File

@@ -139,7 +139,7 @@ func (s *ShumaiService) CallAPIForm(ctx context.Context, apiPath string, reqForm
startTime := time.Now()
timestamp := strconv.FormatInt(time.Now().UnixMilli(), 10)
// 根据参数选择使用的 AppID 和 AppSecret而不是依赖全局状态
var appID, appSecret string
if useGov && s.config.AppID2 != "" {
@@ -149,7 +149,7 @@ func (s *ShumaiService) CallAPIForm(ctx context.Context, apiPath string, reqForm
appID = s.config.AppID
appSecret = s.config.AppSecret
}
// 使用指定的 AppID 生成请求ID
requestID := s.generateRequestIDWithAppID(appID)
sign := GenerateSignForm(appID, timestamp, appSecret)