接悬赏显示优化
Change-Id: Ie5bd2c96a2926c0dd1f037215d97788b0c941f44
diff --git a/react-ui/src/pages/Reward/service.ts b/react-ui/src/pages/Reward/service.ts
index 390f43d..f226bae 100644
--- a/react-ui/src/pages/Reward/service.ts
+++ b/react-ui/src/pages/Reward/service.ts
@@ -9,6 +9,13 @@
BtTorrentAnnounce,
BtTorrentTag,
} from '@/pages/Torrent/data';
+
+
+export async function getTorrentID(rewardId: number): Promise<{ torrentId: number }> {
+ return request(`/api/reward/bt/${rewardId}`, {
+ method: 'GET'
+ });
+}
/** 获取悬赏任务列表 */
export async function getRewardList(params?: RewardListParams) {
const queryString = params
@@ -59,4 +66,17 @@
method: 'post',
data,
});
+}
+
+export async function submitReward(file: File) {
+ const formData = new FormData();
+ formData.append('file', file);
+
+ return request('/api/rward/uploadTorrent', {
+ method: 'POST',
+ data: formData,
+ headers: {
+ 'Content-Type': 'multipart/form-data',
+ },
+ });
}
\ No newline at end of file