import { get, postForm, put } from './http'

/**
 * 获取字典
 */
export const getDictionaries = async () => {
  return await get<any>('/sysDictType/tree')
}

/**
 * 修改密码
 */
export const updatePassword = async (data: any) => {
  return await put<any>('/personal/modifyPersonalConfig', data)
}

/**
 * @description: 上传图片
 * @param {any} data
 * @return {*} 图片地址
 */
export const uploadImgToPath = async (data: any) => {
  return await postForm('/sysFileInfo/tenUploadAll', data)
}

/**
 * @description: 获取角色
 */
export const getRole = async () => {
  return await get<any>('/sysRole/page')
}
