You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
salary-management-oneself/src/api/menu.service.ts

47 lines
935 B
TypeScript

3 years ago
import BasicService from './BasicService';
import config from '@/config';
/**
* @desc
*/
class MenuService extends BasicService {
constructor() {
super();
}
getAccountMenu = async () => {
return this.get(
`/gateway/idm/api/account/menus/${config.get('/app/code')}`,
);
};
/**
*
*/
query = async (searchKey?: string) => {
return this.get(`/gateway/idm/api/menus?searchKey=${searchKey}`);
};
queryByAppId = async (appId: string) => {
return this.get(`/gateway/idm/api/menus/${appId}/menu`);
};
/**
*
*/
getById = async (id: string) => {
return this.get(`/gateway/idm/api/menus/${id}`);
};
/**
*
*/
getChild = async (id: string) => {
return this.get(`/gateway/idm/api/menus/${id}/children`);
};
}
const menuService = new MenuService();
export default menuService;