refactor(docs): 更新API接口文档结构,优化环境配置说明并移除冗余文件
This commit is contained in:
@@ -1608,25 +1608,53 @@ def get_transport_task(task_id):
|
||||
return None
|
||||
```
|
||||
|
||||
## 13. 测试环境
|
||||
## 13. 环境配置
|
||||
|
||||
### 13.1 测试环境信息
|
||||
### 13.1 环境信息
|
||||
|
||||
- **测试环境URL**: `https://api-test.niumall.com/v1`
|
||||
- **测试账号**:
|
||||
- 采购人: test_client / 123456
|
||||
- 供应商: test_supplier / 123456
|
||||
- 司机: test_driver / 123456
|
||||
- 管理员: test_admin / 123456
|
||||
- **本地开发环境**: `http://localhost:4330`
|
||||
- **测试环境**: `https://api-test.niumall.com/v1`
|
||||
- **生产环境**: `https://wapi.yunniushi.cn/v1`
|
||||
|
||||
### 13.2 Postman集合
|
||||
### 13.2 测试账号
|
||||
|
||||
- **采购人**: test_client / 123456
|
||||
- **供应商**: test_supplier / 123456
|
||||
- **司机**: test_driver / 123456
|
||||
- **管理员**: test_admin / 123456
|
||||
|
||||
### 13.3 环境切换配置
|
||||
|
||||
```javascript
|
||||
// 环境配置示例
|
||||
const environments = {
|
||||
development: {
|
||||
baseURL: 'http://localhost:4330',
|
||||
apiVersion: 'v1'
|
||||
},
|
||||
test: {
|
||||
baseURL: 'https://api-test.niumall.com/v1',
|
||||
apiVersion: 'v1'
|
||||
},
|
||||
production: {
|
||||
baseURL: 'https://wapi.yunniushi.cn/v1',
|
||||
apiVersion: 'v1'
|
||||
}
|
||||
};
|
||||
|
||||
// 根据环境变量切换配置
|
||||
const currentEnv = process.env.NODE_ENV || 'development';
|
||||
const config = environments[currentEnv];
|
||||
```
|
||||
|
||||
### 13.4 Postman集合
|
||||
|
||||
我们提供了完整的Postman集合,包含所有API接口的测试用例:
|
||||
|
||||
- **集合下载**: [Niumall API Collection](https://api.niumall.com/docs/postman/collection.json)
|
||||
- **环境配置**: [Niumall API Environment](https://api.niumall.com/docs/postman/environment.json)
|
||||
|
||||
### 13.3 API测试工具
|
||||
### 13.5 API测试工具
|
||||
|
||||
推荐使用以下工具进行API测试:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user