mirror of
https://github.com/PlayEdu/frontend.git
synced 2025-12-24 04:00:07 +08:00
added: api
This commit is contained in:
20
src/api/user.ts
Normal file
20
src/api/user.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import client from "./internal/httpClient";
|
||||
|
||||
export function detail() {
|
||||
return client.get("/api/v1/user/detail", {});
|
||||
}
|
||||
|
||||
// 修改密码
|
||||
export function password(oldPassword: string, newPassword: string) {
|
||||
return client.put("/api/v1/user/avatar", {
|
||||
old_password: oldPassword,
|
||||
new_password: newPassword,
|
||||
});
|
||||
}
|
||||
|
||||
// 学员课程
|
||||
export function courses(depId: number) {
|
||||
return client.get("/api/v1/user/courses", {
|
||||
dep_id: depId,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user