会员消费管理系统API

版本 v1.0.0 • 欢迎使用会员消费管理系统API

📋 API基本信息

API名称 会员消费管理系统API
当前版本 v1.0.0
基础URL https://crm12.yongtuanwang.com/api
当前时间 2026-01-24 15:32:59

提供会员消费管理系统的所有接口服务

🔧 API接口列表

以下是系统中可用的API接口,按功能分类

用户认证

用户登录、注册、权限验证等接口

用户登录
用户登录获取token
POST
用户注册
新用户注册
POST
刷新Token
刷新访问令牌
POST
退出登录
用户退出登录
POST
用户信息
获取当前用户信息
GET

会员管理

会员信息、消费记录、积分管理等接口

会员列表
获取会员列表(可分页)
GET
会员详情
获取指定会员详细信息
GET
添加会员
添加新会员
POST
更新会员
更新会员信息
PUT
删除会员
删除会员(软删除)
DELETE
消费记录
获取会员消费记录
GET
充值记录
获取会员充值记录
GET
积分查询
查询会员积分
GET

消费管理

消费记录、商品管理、订单处理等接口

消费记录
记录会员消费
POST
消费列表
获取消费记录列表
GET
商品列表
获取商品列表
GET
商品分类
获取商品分类
GET
创建订单
创建新订单
POST
订单列表
获取订单列表
GET
订单详情
获取订单详情
GET
取消订单
取消订单
POST

统计分析

数据统计、报表生成、图表数据等接口

每日统计
获取每日消费统计
GET
会员统计
会员增长统计
GET
消费统计
消费数据统计
GET
商品统计
商品销售统计
GET
收入报表
生成收入报表
GET
会员报表
生成会员报表
GET

系统管理

系统配置、权限管理、日志查询等接口

系统配置
获取系统配置
GET
权限列表
获取权限列表
GET
角色管理
获取角色列表
GET
操作日志
查询操作日志
GET
系统状态
获取系统状态信息
GET

💡 接口调用示例

以下是一些常用接口的调用示例和响应格式

用户登录接口调用示例

请求示例
成功响应
错误响应
请求方法: POST
请求URL: /api/auth/login
请求头:
Content-Type: application/json
请求体:
{
    "username": "testuser",
    "password": "123456"
}
成功响应:
{
    "code": 200,
    "msg": "\u767b\u5f55\u6210\u529f",
    "data": {
        "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
        "user_id": 1,
        "username": "testuser",
        "expires_in": 7200
    }
}
错误响应:
{
    "code": 401,
    "msg": "\u7528\u6237\u540d\u6216\u5bc6\u7801\u9519\u8bef",
    "data": null
}

获取会员列表接口调用示例

请求示例
成功响应
请求方法: GET
请求URL: /api/member/list?page=1&limit=10&status=1
请求头:
Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...
请求体:
无请求体(GET请求)
成功响应:
{
    "code": 200,
    "msg": "success",
    "data": {
        "list": [
            {
                "id": 1,
                "name": "\u5f20\u4e09",
                "phone": "13800138000",
                "balance": 100.5
            },
            {
                "id": 2,
                "name": "\u674e\u56db",
                "phone": "13800138001",
                "balance": 200
            }
        ],
        "total": 100,
        "page": 1,
        "limit": 10,
        "pages": 10
    }
}

📊 响应状态码说明

API使用的HTTP状态码及其含义

状态码 说明 典型场景
200 请求成功 请求处理成功
201 创建成功 资源创建成功
204 无内容 其他情况
400 请求参数错误 请求参数格式错误
401 未授权,需要登录 未提供有效Token
403 禁止访问,权限不足 用户权限不足
404 资源不存在 请求的资源不存在
422 请求参数验证失败 其他情况
429 请求过于频繁 其他情况
500 服务器内部错误 服务器内部错误
503 服务暂时不可用 其他情况

📦 统一响应格式

所有接口都遵循以下响应格式

✅ 成功响应格式

{ "code": HTTP状态码,如200, "msg": "响应消息,如"success"", "data": 响应数据,可以是对象、数组或null}

❌ 错误响应格式

{ "code": 错误码,如400, "msg": "错误描述信息", "data": 错误详情或null}

📡 当前请求信息

客户端IP 74.7.227.18
请求方法 GET
请求URL /api
User Agent Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)
基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-01-24 18:41:43 HTTP/1.1 GET : https://crm12.yongtuanwang.com/api
  2. 运行时间 : 0.004548s [ 吞吐率:219.88req/s ] 内存消耗:233.74kb 文件加载:109
  3. 缓存信息 : 0 reads,0 writes
  1. D:\wwwroot\crm12.yongtuanwang.com\public\index.php ( 0.79 KB )
  2. D:\wwwroot\crm12.yongtuanwang.com\vendor\autoload.php ( 0.73 KB )
  3. D:\wwwroot\crm12.yongtuanwang.com\vendor\composer\autoload_real.php ( 1.63 KB )
  4. D:\wwwroot\crm12.yongtuanwang.com\vendor\composer\platform_check.php ( 1.01 KB )
  5. D:\wwwroot\crm12.yongtuanwang.com\vendor\composer\ClassLoader.php ( 15.99 KB )
  6. D:\wwwroot\crm12.yongtuanwang.com\vendor\composer\autoload_static.php ( 9.99 KB )
  7. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-helper\src\helper.php ( 8.34 KB )
  8. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-validate\src\helper.php ( 2.19 KB )
  9. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\helper.php ( 1.47 KB )
  10. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\stubs\load_stubs.php ( 0.16 KB )
  11. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Exception.php ( 1.69 KB )
  12. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-container\src\Facade.php ( 2.71 KB )
  13. D:\wwwroot\crm12.yongtuanwang.com\vendor\ralouphie\getallheaders\src\getallheaders.php ( 1.60 KB )
  14. D:\wwwroot\crm12.yongtuanwang.com\vendor\symfony\deprecation-contracts\function.php ( 0.99 KB )
  15. D:\wwwroot\crm12.yongtuanwang.com\vendor\yansongda\supports\src\Functions.php ( 1.53 KB )
  16. D:\wwwroot\crm12.yongtuanwang.com\vendor\hyperf\engine\src\Functions.php ( 0.83 KB )
  17. D:\wwwroot\crm12.yongtuanwang.com\vendor\symfony\polyfill-mbstring\bootstrap.php ( 8.26 KB )
  18. D:\wwwroot\crm12.yongtuanwang.com\vendor\symfony\polyfill-mbstring\bootstrap80.php ( 9.78 KB )
  19. D:\wwwroot\crm12.yongtuanwang.com\vendor\symfony\var-dumper\Resources\functions\dump.php ( 1.60 KB )
  20. D:\wwwroot\crm12.yongtuanwang.com\vendor\yansongda\artful\src\Functions.php ( 2.49 KB )
  21. D:\wwwroot\crm12.yongtuanwang.com\vendor\guzzlehttp\guzzle\src\functions_include.php ( 0.16 KB )
  22. D:\wwwroot\crm12.yongtuanwang.com\vendor\guzzlehttp\guzzle\src\functions.php ( 5.54 KB )
  23. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-dumper\src\helper.php ( 0.18 KB )
  24. D:\wwwroot\crm12.yongtuanwang.com\vendor\symfony\var-dumper\VarDumper.php ( 4.09 KB )
  25. D:\wwwroot\crm12.yongtuanwang.com\vendor\yansongda\pay\src\Functions.php ( 19.44 KB )
  26. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\App.php ( 15.30 KB )
  27. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-container\src\Container.php ( 15.76 KB )
  28. D:\wwwroot\crm12.yongtuanwang.com\vendor\psr\container\src\ContainerInterface.php ( 1.02 KB )
  29. D:\wwwroot\crm12.yongtuanwang.com\app\provider.php ( 0.19 KB )
  30. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Http.php ( 6.04 KB )
  31. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-helper\src\helper\Str.php ( 7.29 KB )
  32. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Env.php ( 4.68 KB )
  33. D:\wwwroot\crm12.yongtuanwang.com\app\common.php ( 6.40 KB )
  34. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\helper.php ( 18.78 KB )
  35. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Config.php ( 5.54 KB )
  36. D:\wwwroot\crm12.yongtuanwang.com\config\app.php ( 1.40 KB )
  37. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\facade\Env.php ( 1.67 KB )
  38. D:\wwwroot\crm12.yongtuanwang.com\config\auth.php ( 1.99 KB )
  39. D:\wwwroot\crm12.yongtuanwang.com\config\cache.php ( 0.82 KB )
  40. D:\wwwroot\crm12.yongtuanwang.com\config\console.php ( 0.29 KB )
  41. D:\wwwroot\crm12.yongtuanwang.com\config\cookie.php ( 0.56 KB )
  42. D:\wwwroot\crm12.yongtuanwang.com\config\database.php ( 2.13 KB )
  43. D:\wwwroot\crm12.yongtuanwang.com\config\filesystem.php ( 0.61 KB )
  44. D:\wwwroot\crm12.yongtuanwang.com\config\jwt.php ( 1.50 KB )
  45. D:\wwwroot\crm12.yongtuanwang.com\config\lang.php ( 0.91 KB )
  46. D:\wwwroot\crm12.yongtuanwang.com\config\log.php ( 3.82 KB )
  47. D:\wwwroot\crm12.yongtuanwang.com\config\middleware.php ( 0.19 KB )
  48. D:\wwwroot\crm12.yongtuanwang.com\config\pay.php ( 3.01 KB )
  49. D:\wwwroot\crm12.yongtuanwang.com\config\qrcode.php ( 0.35 KB )
  50. D:\wwwroot\crm12.yongtuanwang.com\config\route.php ( 2.05 KB )
  51. D:\wwwroot\crm12.yongtuanwang.com\config\session.php ( 0.60 KB )
  52. D:\wwwroot\crm12.yongtuanwang.com\config\trace.php ( 0.34 KB )
  53. D:\wwwroot\crm12.yongtuanwang.com\config\view.php ( 0.82 KB )
  54. D:\wwwroot\crm12.yongtuanwang.com\app\event.php ( 0.25 KB )
  55. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Event.php ( 7.67 KB )
  56. D:\wwwroot\crm12.yongtuanwang.com\app\service.php ( 0.13 KB )
  57. D:\wwwroot\crm12.yongtuanwang.com\app\AppService.php ( 0.26 KB )
  58. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Service.php ( 1.64 KB )
  59. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Lang.php ( 7.35 KB )
  60. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\lang\zh-cn.php ( 13.70 KB )
  61. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\initializer\Error.php ( 3.31 KB )
  62. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\initializer\RegisterService.php ( 1.33 KB )
  63. D:\wwwroot\crm12.yongtuanwang.com\vendor\services.php ( 0.17 KB )
  64. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\service\PaginatorService.php ( 1.52 KB )
  65. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\service\ValidateService.php ( 0.99 KB )
  66. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\service\ModelService.php ( 2.04 KB )
  67. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-multi-app\src\Service.php ( 1.08 KB )
  68. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-trace\src\Service.php ( 0.77 KB )
  69. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Middleware.php ( 6.72 KB )
  70. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\initializer\BootService.php ( 0.77 KB )
  71. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\Paginator.php ( 11.86 KB )
  72. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-validate\src\Validate.php ( 63.20 KB )
  73. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\Model.php ( 23.55 KB )
  74. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\Attribute.php ( 21.05 KB )
  75. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\AutoWriteData.php ( 4.21 KB )
  76. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\Conversion.php ( 6.44 KB )
  77. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\DbConnect.php ( 5.16 KB )
  78. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\ModelEvent.php ( 2.33 KB )
  79. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\concern\RelationShip.php ( 28.29 KB )
  80. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-helper\src\contract\Arrayable.php ( 0.09 KB )
  81. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-helper\src\contract\Jsonable.php ( 0.13 KB )
  82. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\model\contract\Modelable.php ( 0.09 KB )
  83. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Db.php ( 2.88 KB )
  84. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-orm\src\DbManager.php ( 8.52 KB )
  85. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Log.php ( 6.28 KB )
  86. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Manager.php ( 3.92 KB )
  87. D:\wwwroot\crm12.yongtuanwang.com\vendor\psr\log\src\LoggerTrait.php ( 2.69 KB )
  88. D:\wwwroot\crm12.yongtuanwang.com\vendor\psr\log\src\LoggerInterface.php ( 2.71 KB )
  89. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Cache.php ( 4.92 KB )
  90. D:\wwwroot\crm12.yongtuanwang.com\vendor\psr\simple-cache\src\CacheInterface.php ( 4.71 KB )
  91. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-helper\src\helper\Arr.php ( 16.63 KB )
  92. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\cache\driver\File.php ( 7.84 KB )
  93. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\cache\Driver.php ( 9.03 KB )
  94. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\contract\CacheHandlerInterface.php ( 1.99 KB )
  95. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Console.php ( 22.89 KB )
  96. D:\wwwroot\crm12.yongtuanwang.com\app\Request.php ( 0.09 KB )
  97. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Request.php ( 55.78 KB )
  98. D:\wwwroot\crm12.yongtuanwang.com\app\middleware.php ( 0.32 KB )
  99. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Pipeline.php ( 2.61 KB )
  100. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-trace\src\TraceDebug.php ( 3.40 KB )
  101. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\middleware\AllowCrossDomain.php ( 2.09 KB )
  102. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\middleware\CheckRequestCache.php ( 5.54 KB )
  103. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Response.php ( 8.81 KB )
  104. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\response\Html.php ( 0.97 KB )
  105. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\Cookie.php ( 6.06 KB )
  106. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\think-trace\src\Html.php ( 4.42 KB )
  107. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\log\driver\File.php ( 5.96 KB )
  108. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\contract\LogHandlerInterface.php ( 0.86 KB )
  109. D:\wwwroot\crm12.yongtuanwang.com\vendor\topthink\framework\src\think\log\Channel.php ( 3.89 KB )
0.008413s