审查视图

src/api/api.js 1.5 KB
1 2
import axios from 'axios'
import Vue from 'vue'
朱兆平 authored
3
import qs from 'qs'
4
5
Vue.prototype.$http = axios;
朱兆平 authored
6
7
8
export const getuserMenus = params => { return axios.get(`USER-CENTER/perm/userMenus`, { params: params }); };
朱兆平 authored
9
朱兆平 authored
10
export const getUserList = params => { return axios.get(`/cloud-user-center/user/list`, { params: params }); };
朱兆平 authored
11
12 13
export const getUserListPage = params => { return axios({
    method: 'GET',
14
    url: `/cloud-user-center/user/list`,
15 16 17 18 19 20
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
    // withCredentials: true
}) };
朱兆平 authored
21
22 23
export const removeUser = params => { return axios({
    method: 'DELETE',
24
    url: `/cloud-user-center/user/del`,
25 26 27 28 29
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};
朱兆平 authored
30
31
export const batchRemoveUser = params => { return axios.get(`USER-CENTER/user/batchremove`, { params: params }); };
朱兆平 authored
32
33 34
export const editUser = params => { return axios({
    method: 'PUT',
35
    url: `/cloud-user-center/user/edit`,
36 37 38 39 40
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};
朱兆平 authored
41
42 43
export const addUser = params => { return axios({
    method: 'POST',
44
    url: `/cloud-user-center/user/add`,
45 46 47 48
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
朱兆平 authored
49 50 51 52
})};

export const setUserRole = params => { return axios({
    method: 'PUT',
53
    url: `/cloud-user-center/user/roleset`,
朱兆平 authored
54 55 56 57
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
58
})};