feat: 修改捐赠列表 API

This commit is contained in:
alger
2025-02-12 10:12:20 +08:00
parent 6a0b03cfe1
commit cdaab19afa
2 changed files with 24 additions and 18 deletions
+20
View File
@@ -0,0 +1,20 @@
import axios from 'axios';
export interface Donor {
id: number;
name: string;
amount: number;
date: string;
message?: string;
avatar?: string;
badge: string;
badgeColor: string;
}
/**
* 获取捐赠列表
*/
export const getDonationList = async (): Promise<Donor[]> => {
const { data } = await axios.get('http://110.42.251.190:8766/api/donations');
return data;
};