import api from '@/utils/request'

export const iGetList = params => api.post(`/uiac/account/page`, params)

export const iGetItem = ({ accountId, ...params }) => api.get(`/uiac/account/${accountId}`, params)

export const iUpdateItem = params => api.post(`/uiac/account/update`, params)

export const iAddItem = params => api.post(`/uiac/account/save`, params)

export const iGetRole = params => api.post(`/uiac/role/list`, params)

export const iGetItemRole = ({ accountId, ...params }) => api.get(`/uiac/account/${accountId}/role`, params)

export const iSaveRole = params => api.post(`/uiac/account/relation/role`, params)

export const iDeletaItems = params => api.delData(`/uiac/account`, params)

export const login = params => api.post('/uiac/sign-in', params)

export const getInfo = params => api.get('/uiac/myself', params)

export const logout = params => api.post('/vue-element-admin/user/logout', params)
