Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo && feat #3

Closed
wants to merge 6 commits into from
Closed

typo && feat #3

wants to merge 6 commits into from

Conversation

bestK
Copy link
Contributor

@bestK bestK commented Dec 30, 2024

  1. typo f25b31d
  2. feat 支持自定义接口地址
{
    "region_id": 211,
    "overwrite_urls": {
        "211": {
            "prod": "https://temu-us-api.xxx.com/openapi/router",
            "test": "https://temu-us-api.xxx.com/openapi/router"
        }
    }
}

- 在 Config 结构中添加 OverwriteUrls 字段,用于覆盖默认的 API URL
- 在 NewClient 函数中实现 OverwriteUrls 的逻辑,根据配置覆盖对应的 URL
- 更新 config/config.go,添加 URLPair 结构体和 OverwriteUrls 字段
- 优化了配置结构,将 OverwriteUrls 的值类型改为 URLPair
- 简化了 NewClient 函数中的 URL 重写逻辑
- 使用 cfg 替代 config 作为函数参数,提高可读性
- 优化了日志和请求处理逻辑
- 在 Result 结构体中添加 success、errorCode、errorMsg 和 serverTime 字段
- 更新 Query 方法的返回值结构,以包含新的字段
- 在 semi.order.go 文件中,为查询结果添加了 normal.Response 结构
- 这个改动可能是为了统一查询接口的响应格式,提高代码的一致性和可维护性
@bestK bestK closed this Dec 31, 2024
@hiscaler
Copy link
Owner

hiscaler commented Jan 2, 2025

创一个 Pull Request? 我合并一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants