From 9e842e993e643822e935ff5127ad63add0d64b36 Mon Sep 17 00:00:00 2001 From: xsl Date: Tue, 10 Nov 2026 22:12:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(gateway):=20=E5=B0=86=E6=8E=A5=E5=8F=A311?= =?UTF-8?q?=E9=89=B4=E6=9D=83=E6=B5=8B=E8=AF=95=E9=A1=B5=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E6=A0=87=E5=87=86=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/接口42-52-72网关鉴权.md | 2 +- gateway/app.py | 2 +- static/integration.html | 4 +- static/test_interface11.html | 443 ++++-------------------------- static/test_interface11_auth.html | 73 +---- 5 files changed, 60 insertions(+), 464 deletions(-) diff --git a/docs/接口42-52-72网关鉴权.md b/docs/接口42-52-72网关鉴权.md index a23a66e..55cabf7 100644 --- a/docs/接口42-52-72网关鉴权.md +++ b/docs/接口42-52-72网关鉴权.md @@ -37,4 +37,4 @@ 部署接口 22 前,确认 Worker 池的主备节点均包含接口 22(例如 `ubuntu3090_debug` 上的 `b84a506` 或后续版本)。Worker 启用 IP 白名单时,配置网关直连地址。 -网关测试页为 `/static/test_interface11_auth.html`、`/static/test_interface22.html`、`/static/test_interface42.html`、`/static/test_interface52.html`、`/static/test_interface61.html` 和 `/static/test_interface72.html`。页面可登录、手动刷新令牌并提交图片,访问令牌到期时自动刷新。「测试鉴权」调用 `GET /api/v1/auth/check`,验证无令牌请求返回 HTTP 401、有效令牌请求返回 HTTP 200。 +网关测试页为 `/static/test_interface11.html`、`/static/test_interface22.html`、`/static/test_interface42.html`、`/static/test_interface52.html`、`/static/test_interface61.html` 和 `/static/test_interface72.html`。页面可登录、手动刷新令牌并提交图片,访问令牌到期时自动刷新。「测试鉴权」调用 `GET /api/v1/auth/check`,验证无令牌请求返回 HTTP 401、有效令牌请求返回 HTTP 200。 diff --git a/gateway/app.py b/gateway/app.py index b0ecdd7..a8b55fc 100644 --- a/gateway/app.py +++ b/gateway/app.py @@ -249,7 +249,7 @@ async def index(): "integration_guide": "/static/integration.html", "test_pages": { "if1_measure": "/static/test_interface1.html", - "if11_measure": "/static/test_interface11_auth.html", + "if11_measure": "/static/test_interface11.html", "if2_hair_grow": "/static/test_interface2.html", "if22_hair_grow": "/static/test_interface22.html", "if3_hair_grow_b": "/static/test_interface3.html", diff --git a/static/integration.html b/static/integration.html index 02f8f08..7450dbe 100644 --- a/static/integration.html +++ b/static/integration.html @@ -197,7 +197,7 @@ const { code, data } = await res.json();
curl -sS -X POST "$BASE_URL/api/v1/face/measure-11" \
   -H "Authorization: Bearer $ACCESS_TOKEN" \
   -F 'image_file=@photo.jpg'
-

打开接口 11 测试页

+

打开接口 11 测试页

@@ -526,7 +526,7 @@ console.log(features.gene_style); // "自然型" - + diff --git a/static/test_interface11.html b/static/test_interface11.html index b310aca..308e87c 100644 --- a/static/test_interface11.html +++ b/static/test_interface11.html @@ -3,413 +3,76 @@ -接口11 — 发际线生发 测试页 - - +接口11 — 四庭七眼测量 测试页 + + + +
-

接口11 — 发际线生发

-
- 接口9 头发遮罩 → change_hair 换发型(发际线类型 LoRA)→ 严格按遮罩贴回原图 → 接缝羽化融合。
- 输入:发际线较高 / 头发稀少的正脸图 + 发际线类型 ID。输出:同一个人同一发型、压低发际线后的图。每一步可视化,所有可调参数都在下面。 -
+

📐 四庭七眼测量 — 接口测试

+

POST /api/v1/face/measure-11  |  上传正面照 → 原图+标注叠加显示

-
+
+
+ + + + + +
+

请使用对接账号登录后提交图片。

+ + + +
- - - +
+ +
+ +
-
- - +
+ 支持 JPG / PNG 正面照  |  也可拖拽图片到文件选择框
+
+ -
-
- - -
+ + -
- - -
- -
- - -
- -
- - -
- -
- -
- - + +
接口测试页功能
1. 四庭七眼/static/test_interface1.html上传照片 → 原图+标注叠加,底图/标注开关,指标卡片
11. 四庭七眼(鉴权)/static/test_interface11_auth.html登录、测试鉴权、刷新令牌、四庭七眼测量
11. 四庭七眼(鉴权)/static/test_interface11.html登录、测试鉴权、刷新令牌、四庭七眼测量
2. C端生发/static/test_interface2.html上传+性别 → 方案一覧(原图/叠加/生发),双图对比
22. 生发密度与发际线高度/static/test_interface22.html登录后生成,支持密度多选和发际线高度预览
3. B端生发/static/test_interface3.html划线图上传 → 生发效果图