import request from '../utils/request'

// 修改
export function updateUserInfo(data) {
  return request({
    url: `/system/user/updateUserInfo`,
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: Object.keys(data)
      .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(data[key])}`)
      .join('&')
  })
}

// 回显
export function userUserInfoEdit(params) {
  return request({
    url: `/system/user/userInfo`,
    method: 'get',
    params: params,
  })
}