Spaces:
Sleeping
Sleeping
File size: 459 Bytes
f0953a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import request from "@/utils/request";
export const userApi = {
login: (data: { username: string; password: string }) => {
return request.post<{ token: string }>("/api/user/login", data);
},
register: (data: { username: string; password: string; registerCode: string }) => {
return request.post<{ token: string }>("/api/user/register", data);
},
getSponsors: () => {
return request.get("/api/sponsors?timestamp=" + Date.now());
},
};
|