This commit is contained in:
Mrx
2026-03-06 15:12:58 +08:00
parent ba21a8f965
commit f40950f890

View File

@@ -215,9 +215,12 @@ func (z *ZhichaService) CallAPI(ctx context.Context, proID string, params map[st
return map[string]interface{}{}, nil return map[string]interface{}{}, nil
} }
// 返回data字段 // 返回data字段,如果为空则返回空对象
if zhichaResp.Data != nil && len(zhichaResp.Data) > 0 {
return zhichaResp.Data, nil return zhichaResp.Data, nil
} }
return map[string]interface{}{}, nil
}
// Encrypt 使用配置的加密密钥对数据进行AES-128-CBC加密 // Encrypt 使用配置的加密密钥对数据进行AES-128-CBC加密
func (z *ZhichaService) Encrypt(data string) (string, error) { func (z *ZhichaService) Encrypt(data string) (string, error) {