Skip to content

管理接口

所有管理接口需要在 Header 带 JWT Token。

登录

POST /api/auth/login

bash
curl -X POST https://api.techconsult.site/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"your_password"}'

响应

json
{
  "success": true,
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

Token 有效期 7 天,存 localStorage,后台 pk-order-admin 自动管理。

使用 Token

bash
curl https://api.techconsult.site/api/orders \
  -H "Authorization: Bearer <token>"

PATCH /api/orders/:id/status

更新订单状态。

bash
curl -X PATCH https://api.techconsult.site/api/orders/69e2096fb89a14295f5964fa/status \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"status":"paid"}'
可选 status说明
pending待支付
paid已支付
cancelled已取消

后台管理入口

不建议直接调接口,使用 pk-order-admin:

域名后台地址
techconsult.siteadmin.techconsult.site
technologyconsult.orgadmin.technologyconsult.org

PK 电商站群内部台账