更换发型成功

This commit is contained in:
xsl
2026-01-18 22:10:48 +08:00
parent bf2d7d2bba
commit 11dd30eddf
8 changed files with 306 additions and 282 deletions
+9
View File
@@ -177,7 +177,15 @@ async function handleConfirmHairstyle() {
}
try {
// 显示加载状态,并提示用户可能需要等待的时间
elements.loading.innerHTML = `
<div class="loading-spinner"></div>
<p>正在处理发型更换,请稍候...</p>
<p style="font-size: 0.9rem; color: #666;">此过程可能需要10-60秒</p>
`;
showLoading();
// 发起发型更换请求
const response = await changeHair(uploadedImage, selectedHairstyle);
if (response.success) {
@@ -187,6 +195,7 @@ async function handleConfirmHairstyle() {
alert(response.message || '处理失败,请重试');
}
} catch (error) {
console.error('处理失败:', error);
alert('处理失败,请重试');
} finally {
hideLoading();