import request from '@/utils/request'
import state from '@/store'
import router from '@/router'
export function login(username, password) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '菜单模块系统_用户名密码_查询数据',
      param: `用户名=${username}&密码=${password}`
    }
  })
}
//
export function getInfo(token) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '1',
      name: '菜单模块系统_项目角色模块列表_二级_查询数据',
      param: `角色编号=${token}`
    }
  })
}
// 修改密码
export function editPassword(num1, num2, num3, num4) {
  return request({
    url: '',
    method: 'post',
    data: {
      UserID: state.state.user.id,
      ModularID: router.currentRoute.path,
      type: '2',
      name: '账号信息_修改密码_MESWORK',
      param: '考勤编号=' + num1 + '=string&原始密码=' + num2 + '=string&新密码=' + num3 + '=string&返回=' + num4 + '=string=output'
    }
  })
}
