# api 请求模版
import request from '@/utils/request'
import qs from 'qs' // 用到表单提交时才引用
const BASE_URI = 'sys_users/'
const uri = {
SYS_USERS: BASE_URI
}
export function list(data) {
return request({
url: uri.SYS_USERS,
method: 'GET',
params: data
})
}
export function add(data) {
return request({
url: uri.SYS_USERS,
method: 'POST',
data
})
}
export function byIdArrDelete(data) {
return request({
url: uri.SYS_USERS,
method: 'DELETE',
data
})
}
export function edit(data) {
return request({
url: uri.SYS_USERS,
method: 'PUT',
data
})
}
/**
* 表单提交方式
*/
export function login(data) {
return request({
url: uri.LOGIN,
method: 'POST',
data: qs.stringify(data)
})
}