| | |
| | | import request from '@/config/axios' |
| | | |
| | | import { config } from '@/config/axios/config' |
| | | |
| | | const { plat_url} = config |
| | | |
| | | export interface MenuVO { |
| | | id: number |
| | | name: string |
| | |
| | | |
| | | // 查询菜单(精简)列表 |
| | | export const getSimpleMenusList = () => { |
| | | return request.get({ url: '/system/menu/simple-list' }) |
| | | return request.get({ url: plat_url + '/system/menu/simple-list' }) |
| | | } |
| | | |
| | | // 查询应用菜单(精简)列表 |
| | | export const getSimpleAppMenusList = () => { |
| | | return request.get({ url: '/system/menu/simple-app-menus' }) |
| | | return request.get({ url: plat_url + '/system/menu/simple-app-menus' }) |
| | | } |
| | | |
| | | // 查询菜单列表 |
| | | export const getMenuList = (params) => { |
| | | return request.get({ url: '/system/menu/list', params }) |
| | | return request.get({ url: plat_url + '/system/menu/list', params }) |
| | | } |
| | | |
| | | // 查询应用菜单列表 |
| | | export const getAppMenuList = (params) => { |
| | | return request.get({ url: '/system/menu/app-menu-list', params }) |
| | | return request.get({ url: plat_url + '/system/menu/app-menu-list', params }) |
| | | } |
| | | |
| | | // 获取菜单详情 |
| | | export const getMenu = (id: number) => { |
| | | return request.get({ url: '/system/menu/get?id=' + id }) |
| | | return request.get({ url: plat_url + '/system/menu/get?id=' + id }) |
| | | } |
| | | |
| | | // 获取应用菜单详情 |
| | | export const getAppMenu = (id: number) => { |
| | | return request.get({ url: '/system/menu/getAppMenu?id=' + id }) |
| | | return request.get({ url: plat_url + '/system/menu/getAppMenu?id=' + id }) |
| | | } |
| | | |
| | | // 新增菜单 |
| | | export const createMenu = (data: MenuVO) => { |
| | | return request.post({ url: '/system/menu/create', data }) |
| | | return request.post({ url: plat_url + '/system/menu/create', data }) |
| | | } |
| | | |
| | | // 新增应用菜单 |
| | | export const createAppMenu = (data: MenuVO) => { |
| | | return request.post({ url: '/system/menu/createAppMenu', data }) |
| | | return request.post({ url: plat_url + '/system/menu/createAppMenu', data }) |
| | | } |
| | | |
| | | // 修改菜单 |
| | | export const updateMenu = (data: MenuVO) => { |
| | | return request.put({ url: '/system/menu/update', data }) |
| | | return request.put({ url: plat_url + '/system/menu/update', data }) |
| | | } |
| | | |
| | | // 修改应用菜单 |
| | | export const updateAppMenu = (data: MenuVO) => { |
| | | return request.put({ url: '/system/menu/updateAppMenu', data }) |
| | | return request.put({ url: plat_url + '/system/menu/updateAppMenu', data }) |
| | | } |
| | | |
| | | // 删除菜单 |
| | | export const deleteMenu = (id: number) => { |
| | | return request.delete({ url: '/system/menu/delete?id=' + id }) |
| | | return request.delete({ url: plat_url + '/system/menu/delete?id=' + id }) |
| | | } |
| | | |
| | | // 删除应用菜单 |
| | | export const deleteAppMenu = (id: number) => { |
| | | return request.delete({ url: '/system/menu/deleteAppMenu?id=' + id }) |
| | | return request.delete({ url: plat_url + '/system/menu/deleteAppMenu?id=' + id }) |
| | | } |