You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
659 B

import {GetApi, PostApi} from "@/api/request"
6 years ago
export const login = new PostApi(`/account/login`)
6 years ago
export const logout = new GetApi(`/account/logout`)
6 years ago
export const register = new PostApi(`/account/register`)
6 years ago
export const updateUserPwd = new PostApi(`/account/updatePwd`)
6 years ago
export const updateAvatar = new GetApi(
`/account/updateAvatar`,
key => ({params: {key: encodeURIComponent(key)}}),
p => p.then(({data}) => data)
)
6 years ago
export const validate = new GetApi(`/account/validate`, pwd => ({params: {pwd}}))
6 years ago
export const checkName = new GetApi(
`/account/checkName`,
(name, id) => ({params: {name, id}}),
p => p.then(({data}) => data)
)