小程序后端接口完整指南 | 版本 v2.1.0
Base URL: https://xiajiufang.cn
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | wx.login() 获取的 code |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| name | string | 否 | 用户昵称 |
| contact | string | 否 | 手机号 |
Content-Type: multipart/form-data
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| file | file | 是 | 图片文件 (jpg/png) |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 是 | brew(精酿)/other(其他) |
| 参数 | 类型 | 说明 |
|---|---|---|
| id | int | 商品ID |
| 参数 | 类型 | 说明 |
|---|---|---|
| status | string | 筛选状态:pending/paid/preparing/delivered/completed/cancelled |
| page | int | 页码,默认1 |
| page_size | int | 每页数量,默认10 |
| 参数 | 类型 | 说明 |
|---|---|---|
| type | string | single/cycle/other |
| id | int | 订单ID |
只能取消未发货的订单,已支付订单会进入退款流程
获取所有可用的自取点地址
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| user_id | int | 是 | 用户ID |
| message | string | 是 | 用户消息 |
| use_llm | bool | 否 | 是否使用大模型,默认true |
支持 jpg/png/gif/webp,最大5MB
| 参数 | 说明 |
|---|---|
| folder | 存储文件夹:common/comment/avatar/product |
| 参数 | 类型 | 说明 |
|---|---|---|
| file | file | 图片文件 |
专用于评论中的图片上传
一次上传多张图片,适用于评论晒图等场景
| 参数 | 类型 | 说明 |
|---|---|---|
| order_id | int | 订单ID |
| order_type | string | single/cycle/other |
前端使用 pay_params 调起 wx.requestPayment()
查询订单是否已支付
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| order_id | int | 是 | 订单ID |
| order_type | string | 是 | 订单类型 |
| refund_amount | int | 否 | 退款金额(分),不传则全额退款 |
| reason | string | 否 | 退款原因 |
| 参数 | 类型 | 说明 |
|---|---|---|
| upcoming | bool | 是否只显示未来活动,默认true |
| limit | int | 返回数量,默认50 |
| 参数 | 类型 | 说明 |
|---|---|---|
| product_id | int | 商品ID |
| content | string | 评论内容 |
| pics | array | 图片URL数组 |
| 参数 | 类型 | 说明 |
|---|---|---|
| product_id | int | 商品ID |
| score | int | 评分 1-5 |