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.
31 lines
495 B
31 lines
495 B
import http from "@/utils/request";
|
|
|
|
class AuthAPI {
|
|
// 注册
|
|
static signUp(data) {
|
|
return http.post("/auth/signup", data, {
|
|
custom: {
|
|
loading: true,
|
|
},
|
|
});
|
|
}
|
|
|
|
// 登录
|
|
static signIn(data) {
|
|
return http.post("/auth/signin", data, {
|
|
custom: {
|
|
loading: true,
|
|
},
|
|
});
|
|
}
|
|
|
|
// 刷新token
|
|
static refreshToken(header = {}) {
|
|
return http.post("/auth/refresh", undefined, {
|
|
header,
|
|
});
|
|
}
|
|
}
|
|
|
|
export default AuthAPI;
|