当前查看模块:memberType
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| Authorization | 否 | string | Bearer <JWT token> |
用户登录后的 JWT 令牌。若已登录可直接使用,无需传 X-Client。。认证 Token,请在请求头中携带,推荐格式:Bearer {token} |
| X-Client | 否 | string | <client key token> |
客户端密钥。当未携带或无法使用 Authorization 时必填,用于密钥认证。线上文档: http://localhost:5601/docs |
| X-Site | 是 | string | <site key> |
站点标识(必填)。用于切换站点和对应的数据库上下文。所有 OpenAPI 接口必须提供有效的 X-Site header。 |
| X-System-Code | 是 | string | AUTH_MANAGEMENT |
系统编码(必填)。用于指定当前访问的业务系统(例如 AUTH_MANAGEMENT、CONTENT_MANAGEMENT)。当系统不支持时将返回“登录用户不支持当前系统,可联系管理员处理”。 |
模块标识: memberType | 接口数量: 6
/api/members/types/valid-list
暂无请求参数定义
{
"success": {
"code": "0000",
"message": "操作成功",
"data": [
{
"id": "xxx",
"_id": "xxx",
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型"
},
{
"id": "yyy",
"_id": "yyy",
"code": "GOLD",
"name": "黄金会员",
"description": "黄金会员类型"
}
],
"timestamp": "2025-01-21T10:00:00.000Z"
},
"failure": {
"code": "4000",
"message": "获取失败",
"data": null
}
}
/api/members/types
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| pageNum | 否 | number | - | 页码,默认1 |
| pageSize | 否 | number | - | 每页数量,默认10 |
| name | 否 | string | - | 会员类型名称关键词 |
| code | 否 | string | - | 会员类型编码关键词 |
| status | 否 | number | - | 状态过滤:1-有效,0-无效 |
{
"success": {
"code": "0000",
"message": "获取成功",
"data": {
"list": [
{
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z",
"updateTime": "2025-01-01T10:00:00.000Z"
}
],
"total": 100,
"pageNum": 1,
"pageSize": 10,
"totalPages": 10
}
}
}
/api/members/types
{
"name": "string|必填,会员类型名称",
"code": "string|必填,会员类型编码",
"status": "number|可选,状态:1-有效,0-无效,默认1",
"description": "string|可选,描述信息"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "创建成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"createTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "会员类型编码已存在",
"data": null
}
}
/api/members/types/{typeId}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"name": "string|可选,会员类型名称",
"code": "string|可选,会员类型编码",
"status": "number|可选,状态:1-有效,0-无效",
"description": "string|可选,描述信息"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "更新成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"description": "VIP会员类型",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4000",
"message": "会员类型编码已存在",
"data": null
}
}
/api/members/types/{typeId}
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"success": {
"code": "0000",
"message": "删除成功",
"data": null
},
"failure": {
"code": "4000",
"message": "会员类型仍与会员功能关联,请先解除关联",
"data": null
}
}
/api/members/types/{typeId}/status
| 参数名 | 必填 | 类型 | 示例 | 说明 |
|---|---|---|---|---|
| typeId | 是 | string | - | 会员类型ID |
{
"status": "number|必填,状态:1-有效,0-无效"
}请按照示例结构封装请求体字段,并确保必填字段完整。
{
"success": {
"code": "0000",
"message": "状态更新成功",
"data": {
"id": 1,
"code": "VIP",
"name": "VIP会员",
"status": 1,
"updateTime": "2025-01-01T10:00:00.000Z"
}
},
"failure": {
"code": "4040",
"message": "会员类型不存在",
"data": null
}
}