✨ update api url
This commit is contained in:
@@ -4,7 +4,7 @@ import {service} from "@/utils/alova/service.ts";
|
||||
* 获取旋转验证码图片数据
|
||||
*/
|
||||
export const getRotatedCaptchaData = () => {
|
||||
return service.Get('/api/captcha/rotate/get', {
|
||||
return service.Get('/api/captcha/rotate/generate', {
|
||||
meta: {
|
||||
ignoreToken: true
|
||||
},
|
||||
|
@@ -4,7 +4,7 @@ import {service} from "@/utils/alova/service.ts";
|
||||
* 获取Gitee登录链接
|
||||
*/
|
||||
export const getGiteeUrl = () => {
|
||||
return service.Get('/api/oauth/gitee/get_url',
|
||||
return service.Get('/api/oauth/gitee/url',
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
|
@@ -4,7 +4,7 @@ import {service} from "@/utils/alova/service.ts";
|
||||
* Get Github OAuth URL
|
||||
*/
|
||||
export const getGithubUrl = (state: string) => {
|
||||
return service.Get('/api/oauth/github/get_url',
|
||||
return service.Get('/api/oauth/github/url',
|
||||
{
|
||||
params: {
|
||||
state: state
|
||||
|
@@ -4,7 +4,7 @@ import {service} from "@/utils/alova/service.ts";
|
||||
* 生成客户端id
|
||||
*/
|
||||
export const generateClientId = () => {
|
||||
return service.Get('/api/client/generate_client_id',
|
||||
return service.Get('/api/client/generate',
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: true,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import {service} from "@/utils/alova/service.ts";
|
||||
|
||||
export const getQQUrl = (state: string) => {
|
||||
return service.Get('/api/oauth/qq/get_url',
|
||||
return service.Get('/api/oauth/qq/url',
|
||||
{
|
||||
params: {
|
||||
state: state
|
||||
|
@@ -5,7 +5,7 @@ import {service} from "@/utils/alova/service.ts";
|
||||
* @param clientId
|
||||
*/
|
||||
export const generateQrCode = (clientId: string) => {
|
||||
return service.Get('/api/oauth/wechat/get_temp_qrcode',
|
||||
return service.Get('/api/oauth/wechat/qrcode',
|
||||
{
|
||||
params: {
|
||||
client_id: clientId
|
||||
|
@@ -52,7 +52,7 @@ export const sendMessage = (params: any) => {
|
||||
* @param param
|
||||
*/
|
||||
export const phoneLoginApi = (param: PhoneLogin) => {
|
||||
return service.Post('/api/user/phone_login', {
|
||||
return service.Post('/api/user/phone/login', {
|
||||
phone: param.phone,
|
||||
captcha: param.captcha,
|
||||
auto_login: param.auto_login
|
||||
@@ -90,7 +90,7 @@ export const accountLoginApi = (param: AccountLogin) => {
|
||||
* @param param
|
||||
*/
|
||||
export const resetPasswordApi = (param: ResetPassword) => {
|
||||
return service.Post('/api/user/reset_password', {
|
||||
return service.Post('/api/user/reset/password', {
|
||||
phone: param.phone,
|
||||
captcha: param.captcha,
|
||||
password: param.password,
|
||||
@@ -103,28 +103,13 @@ export const resetPasswordApi = (param: ResetPassword) => {
|
||||
}
|
||||
);
|
||||
};
|
||||
/**
|
||||
* 获取用户权限
|
||||
* @param user_id
|
||||
*/
|
||||
export const getUserPermissions = (user_id: string) => {
|
||||
return service.Post('/api/auth/permission/get_user_permissions', {
|
||||
user_id: user_id
|
||||
},
|
||||
{
|
||||
meta: {
|
||||
ignoreToken: false,
|
||||
}
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户设备信息
|
||||
*/
|
||||
export const getUserDevice = () => {
|
||||
return service.Get('/api/user/get_device',
|
||||
return service.Get('/api/user/device',
|
||||
{
|
||||
params: {},
|
||||
meta: {
|
||||
|
Reference in New Issue
Block a user