更换发型成功
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user