李磊
3 years ago
4 changed files with 69 additions and 41 deletions
@ -0,0 +1,39 @@ |
|||
import api from '@/utils/api' |
|||
import qs from 'qs' |
|||
|
|||
export function add(data) { |
|||
return api({ |
|||
url: '/user', |
|||
method: 'post', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function edit(data) { |
|||
return api({ |
|||
url: '/user', |
|||
method: 'put', |
|||
data |
|||
}) |
|||
} |
|||
|
|||
export function del(params) { |
|||
return api({ |
|||
url: '/user', |
|||
method: 'delete', |
|||
params, |
|||
paramsSerializer: function(params) { |
|||
return qs.stringify(params, { indices: false }) |
|||
} |
|||
}) |
|||
} |
|||
|
|||
export function getList(params) { |
|||
return api({ |
|||
url: '/user/list', |
|||
method: 'get', |
|||
params |
|||
}) |
|||
} |
|||
|
|||
export default { add, edit, del, getList } |
Loading…
Reference in new issue