user.js 817 Bytes
import request from '@/utils/request'

// 个人信息
export function profile() {
  return request({
    url: '/system/user/profile',
    method: 'get',
  })
}

// 更新个人信息
export function updateProfile(data) {
  
  return request({
    url: '/system/user/profile',
    method: 'put',
    data
  })
}

// 修改密码
export function updatePwd(oldPassword,newPassword) {
  const data = {
    oldPassword,
    newPassword
  }
  return request({
    url: '/system/user/profile/updatePwd',
    method: 'put',
    params: data
  })
}

// 部门树
export function treeselect() {
  return request({
    url: '/system/dept/treeselect',
    method: 'get'   
  })
}

// 获取用户列表
export function userList(data) {
  return request({
    url: '/system/user/list',
    method: 'get',
    params: data 
  })
}