审查视图

src/api/api.js 1.4 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(`/perm/userMenus`, { params: params }); };
朱兆平 authored
9
10
export const getUserList = params => { return axios.get(`/hqpt-user-center/user/list`, { params: params }); };
朱兆平 authored
11
12 13 14 15 16 17 18 19 20
export const getUserListPage = params => { return axios({
    method: 'GET',
    url: `/user/list`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
    // withCredentials: true
}) };
朱兆平 authored
21
22 23 24 25 26 27 28 29
export const removeUser = params => { return axios({
    method: 'DELETE',
    url: `/user/del`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};
朱兆平 authored
30
朱兆平 authored
31
export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); };
朱兆平 authored
32
33 34 35 36 37 38 39 40
export const editUser = params => { return axios({
    method: 'PUT',
    url: `/user/edit`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
})};
朱兆平 authored
41
42 43 44 45 46 47 48
export const addUser = params => { return axios({
    method: 'POST',
    url: `/user/add`,
    data: params,
    headers: {
        'Content-Type': 'application/json;charset=UTF-8'
    }
朱兆平 authored
49 50 51 52 53 54 55 56 57
})};

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