合并冲突
Change-Id: I3b6ac5ae87aad8fe746eceecc8f92fc5574b50a8
diff --git a/src/pages/Bounty/Detail.tsx b/src/pages/Bounty/Detail.tsx
index 41a25df..78743da 100644
--- a/src/pages/Bounty/Detail.tsx
+++ b/src/pages/Bounty/Detail.tsx
@@ -36,7 +36,7 @@
if (res.code === 200) {
message.success('采纳成功');
- setBounty(prev => {
+ setBounty((prev: API.BountyDetail) => {
console.log('【状态更新】', {
old: prev.submissions,
new: prev.submissions?.map(sub =>
@@ -49,7 +49,7 @@
submissions: prev.submissions?.map(sub =>
sub.id === submissionId ? { ...sub, status: 1 } : sub
)
- };
+ } as API.BountyDetail;
});
} else {
message.error(`采纳失败: ${res.msg}`);
@@ -75,14 +75,14 @@
}
const blob = await downloadAttachment(attachmentPath);
- const url = window.URL.createObjectURL(blob);
+ const url = (window as any).URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = attachmentPath.split('/').pop() || 'file';
document.body.appendChild(a);
a.click();
a.remove();
- window.URL.revokeObjectURL(url);
+ (window as any).URL.revokeObjectURL(url);
} catch (err) {
message.error('下载附件失败,请重试');
console.error('下载附件失败:', err);
@@ -104,7 +104,7 @@
console.error('获取用户信息失败:', err);
}
};
- fetchProfile();
+ fetchProfile().then(r => {});
}, []);
@@ -134,7 +134,7 @@
}
};
- loadBountyDetail();
+ loadBountyDetail().then(r => {});
}, [id]);
return (