审查视图

src/api/perm_api.js 1.0 KB
1 2
import axios from 'axios'
3
<<<<<<< HEAD
朱兆平 authored
4
let base = '/cloud-user-center/perm';
5
=======
6
axios.defaults.baseURL = 'http://localhost:8082/api';
7
let base = axios.defaults.baseURL+'USER-CENTER/perm';
8
>>>>>>> bc2ec1ef193de6a4d7b7d18f1b5d08e9f5203861
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41


export const getList = params => { return axios.get(`${base}/list`, { params: params }); };


export const remove = params => { return axios({
    method: 'DELETE',
    url: `${base}/del`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};

//批量删除
export const batchRemove = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

export const edit = params => { return axios({
    method: 'PUT',
    url: `${base}/edit`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};

export const add = params => { return axios({
    method: 'POST',
    url: `${base}/add`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
42
})};