Files
fe_supplier_frontend/src/servers/api/login.ts
2025-07-23 16:49:35 +08:00

107 lines
1.8 KiB
TypeScript

import request from '@/utils/request';
/**
* 验证码
*/
export async function getCaptcha() {
return request('/v1/login/getCaptcha', {
method: 'GET'
});
}
/**
* 招标代理
*/
export async function accountLogin (data: API.LoginSupplier) {
return request('/v1/login/accountLogin', {
method: 'POST',
data
});
}
/**
* 专家
*/
export async function expertLogin (data: API.LoginSupplier) {
return request('/v1/login/expertLogin', {
method: 'POST',
data
});
}
/**
* 供应商
*/
export async function supplierLogin (data: API.LoginSupplier) {
return request('/v1/login/accountLogin/supplier', {
method: 'POST',
data
});
}
/**
* 用户信息
*/
export async function getUserinfo() {
return request('/v1/userinfo/get', {
method: 'GET'
});
}
/**
* 字典缓存接口
*/
export async function refreshDictCache() {
return request('/v1/dictProject/refreshDictCache', {
method: 'GET'
});
}
/**
* 退出
*/
export async function Logout() {
return request('/v1/login/logout', {
method: 'POST'
});
}
/**
* 路由
*/
export async function findMenuList(data: any) {
return request('/v1/menu/findMenuList', {
method: 'POST',
data
});
}
/**
* 部门
*/
export async function queryUserOrgAll() {
return request('/org/queryUserOrgAll', {
method: 'GET'
});
}
/**
* 发送验证码
*/
interface sendCodeData {
account: string;
}
export async function sendCode(data: sendCodeData) {
return request('/v1/login/forgotPassword/sendCode', {
method: 'POST',
data
});
}
/**
* 校验验证码并设置新密码
*/
interface resetData {
account: string;
identifying: string;
password: string;
}
export async function reset(data: resetData) {
return request('/v1/login/forgotPassword/reset', {
method: 'POST',
data
});
}