fix: 测试页同时兼容 base64 与 URL 图片字段
直连 worker 返回 *_base64、经网关则改写为 *_url;统一 resolveImgSrc 后接口1/2/3/5/6 测试页都能正确显示结果图。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,7 +71,7 @@
|
||||
|
||||
@media (max-width: 800px) { .results-layout, .preview-row { flex-direction: column; } }
|
||||
</style>
|
||||
<script src="/static/img_downscale.js"></script>
|
||||
<script src="/static/img_downscale.js?v=2"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -175,7 +175,7 @@ async function submitTest() {
|
||||
$('hairlineType').style.display = 'inline-block';
|
||||
}
|
||||
|
||||
const grownSrc = d.hair_growth_image_url || (d.hair_growth_image_base64 ? 'data:image/jpeg;base64,' + d.hair_growth_image_base64 : '');
|
||||
const grownSrc = resolveImgSrc(d.hair_growth_image_url, d.hair_growth_image_base64, 'image/jpeg');
|
||||
if (grownSrc) {
|
||||
$('blendTop').src = grownSrc;
|
||||
$('blendTop').style.display = 'block';
|
||||
|
||||
Reference in New Issue
Block a user