diff --git a/static/integration.html b/static/integration.html
index f5a7367..65f77f6 100644
--- a/static/integration.html
+++ b/static/integration.html
@@ -72,7 +72,7 @@
| 编码 | UTF-8 |
| Content-Type | multipart/form-data |
| 图片参数 | 三选一:image_file(文件上传)/ image_url(URL)/ image_base64(base64 + 前缀) |
- | 图片格式 | JPG / PNG,≤ 1 MB,单人正面照 |
+ | 图片格式 | JPG / PNG,单人正面照 |
统一响应结构:
@@ -303,10 +303,10 @@ console.log(features['四季色彩季型']); // "冷夏型"(中文字段也保
| code | message | 说明 |
| 1001 | 无法识别人像 | 未检测到人脸 |
- | 1002 | 人像分辨率过低 | 低于最低分辨率 |
+
| 1003 | 角度问题,非正面照 | 非正面 / 角度过大 |
| 1005 | 检测到多张人脸 | 仅支持单人 |
- | 1006 | 文件超出大小限制 | 单文件 > 1 MB |
+
| 1007 | 图片参数错误 / 后端不可用 | 参数传错 / 服务繁忙请稍后重试 |
| 1008 | 图片格式不支持 | 非 JPG/PNG / base64 解码失败 |
diff --git a/static/test_interface1.html b/static/test_interface1.html
index 82d2b80..5fd61e6 100644
--- a/static/test_interface1.html
+++ b/static/test_interface1.html
@@ -78,7 +78,7 @@
- 支持 JPG / PNG 正面照 | 单文件 ≤ 1 MB | 也可拖拽图片到文件选择框
+ 支持 JPG / PNG 正面照 | 也可拖拽图片到文件选择框
@@ -129,7 +129,7 @@ async function submitTest() {
const fileInput = $('imageFile');
const file = fileInput.files[0];
if (!file) { setStatus('请先选择一张图片', 'error'); return; }
- if (file.size > 1_000_000) { setStatus('文件超过 1 MB 限制', 'error'); return; }
+
const btn = $('submitBtn');
btn.disabled = true;
diff --git a/static/test_interface2.html b/static/test_interface2.html
index 0d0938d..a14b6a3 100644
--- a/static/test_interface2.html
+++ b/static/test_interface2.html
@@ -99,7 +99,7 @@
- JPG/PNG ≤1MB | 生发图生成较慢(数十秒~数分钟),请耐心等待
+ JPG/PNG | 生发图生成较慢(数十秒~数分钟),请耐心等待
@@ -138,7 +138,7 @@ function setStatus(t, type) { const b=$('statusBar'); b.textContent=t; b.classNa
async function submitTest() {
const f = $('imageFile').files[0];
if (!f) { setStatus('请选择图片', 'error'); return; }
- if (f.size > 1_000_000) { setStatus('文件超过 1 MB', 'error'); return; }
+
_origUrl = URL.createObjectURL(f);
$('submitBtn').disabled = true; $('submitBtn').textContent = '⏳ 请求中...';
diff --git a/static/test_interface3.html b/static/test_interface3.html
index 82c0541..12394f9 100644
--- a/static/test_interface3.html
+++ b/static/test_interface3.html
@@ -99,7 +99,7 @@
- JPG/PNG ≤1MB | 用马克笔在用户照片额头画发际线后拍照上传 | 不再需要原始照片
+ JPG/PNG | 用马克笔在用户照片额头画发际线后拍照上传 | 不再需要原始照片
@@ -141,7 +141,7 @@ function setStatus(t, type) { const b=$('statusBar'); b.textContent=t; b.classNa
async function submitTest() {
const mf = $('markedFile').files[0];
if (!mf) { setStatus('请选择划线图', 'error'); return; }
- if (mf.size > 1_000_000) { setStatus('文件超过 1 MB', 'error'); return; }
+
const markedUrl = URL.createObjectURL(mf);
// 先显示原图
diff --git a/static/test_interface5.html b/static/test_interface5.html
index 696f7f0..4dfb7be 100644
--- a/static/test_interface5.html
+++ b/static/test_interface5.html
@@ -85,7 +85,7 @@
- JPG/PNG 正面照,≤1MB | Female: 椭圆/花瓣/心形/直线/波浪 | Male: 椭圆/M形/直线/倒弧 | 返回中心点坐标(原图像素)
+ JPG/PNG 正面照 | Female: 椭圆/花瓣/心形/直线/波浪 | Male: 椭圆/M形/直线/倒弧 | 返回中心点坐标(原图像素)
@@ -134,7 +134,7 @@ function setStatus(t, type) { const b=$('statusBar'); b.textContent=t; b.classNa
async function submitTest() {
const f = $('imageFile').files[0];
if (!f) { setStatus('请选择图片', 'error'); return; }
- if (f.size > 1_000_000) { setStatus('文件超过 1 MB', 'error'); return; }
+
_origUrl = URL.createObjectURL(f);
$('submitBtn').disabled = true; $('submitBtn').textContent = '⏳ ...';
diff --git a/static/test_interface6.html b/static/test_interface6.html
index ff81b1a..296a807 100644
--- a/static/test_interface6.html
+++ b/static/test_interface6.html
@@ -80,7 +80,7 @@
- 支持 JPG / PNG 正面照 | 单文件 ≤ 1 MB | 也可拖拽图片到文件选择框
+ 支持 JPG / PNG 正面照 | 也可拖拽图片到文件选择框
@@ -131,7 +131,7 @@ async function submitTest() {
const fileInput = $('imageFile');
const file = fileInput.files[0];
if (!file) { setStatus('请先选择一张图片', 'error'); return; }
- if (file.size > 1_000_000) { setStatus('文件超过 1 MB 限制', 'error'); return; }
+
const btn = $('submitBtn');
btn.disabled = true;
diff --git a/static/test_interface7.html b/static/test_interface7.html
index 26ebd34..064650d 100644
--- a/static/test_interface7.html
+++ b/static/test_interface7.html
@@ -100,7 +100,7 @@
- JPG/PNG ≤1MB | 生发图生成较慢(数十秒~数分钟),请耐心等待 | 工作流: add_hair2.json
+ JPG/PNG | 生发图生成较慢(数十秒~数分钟),请耐心等待 | 工作流: add_hair2.json
@@ -139,7 +139,7 @@ function setStatus(t, type) { const b=$('statusBar'); b.textContent=t; b.classNa
async function submitTest() {
const f = $('imageFile').files[0];
if (!f) { setStatus('请选择图片', 'error'); return; }
- if (f.size > 1_000_000) { setStatus('文件超过 1 MB', 'error'); return; }
+
_origUrl = URL.createObjectURL(f);
$('submitBtn').disabled = true; $('submitBtn').textContent = '⏳ 请求中...';