menu.js 455 Bytes
Newer Older
陈浩玮's avatar
角色  
陈浩玮 committed
1
import { delReq, getReq, postReq, putReq } from '@/utils';
2 3 4 5 6 7 8 9 10 11 12 13

export function delMenuApi(id) {
    return delReq(`/api/v1/menus/${id}`);
}

export function getMenuDataApi() {
    return getReq('/api/v1/menus');
}

export function addMenuApi(data) {
    return postReq('/api/v1/menus', data);
}
水落(YangLei)'s avatar
水落(YangLei) committed
14 15 16 17

export function addRoleApi(data) {
    return postReq('/api/v1/roles', data);
}
陈浩玮's avatar
角色  
陈浩玮 committed
18 19 20
export function updateRoleApi(data) {
    return putReq('/api/v1/roles', data);
}