import Http from '../http'

export const login = function (loginForm) {
  return Http.post('/user/login', loginForm)
}

// 登录验证码
export const verificationImg = function () {
  return Http.get('/login/verificationImg')
}

// 登录二维码
export const loginQrcode = function () {
  return Http.get('/login/loginQrcode')
}

export const menu = function (url) {
  return Http.get(url)
}

export const portalMenu = function () {
  return Http.get('/portalMenu/portalMenu')
}

/**
 * 获取子系统菜单
 *
 * @param {string} clientId 应用ID
 */
// export const portalMenu = function(id) {
//     return Http.get('/account/rest/v1/modules/find-subsystem-by-clientid?clientId='+id)
// }

/**
 * 获取当前子系统下的菜单目录
 *
 * @param {string} clientId 应用ID
 * @param {string} parentId 子系统ID
 */
// export const menu = function(clientId,parentId) {
//     return Http.get('/account/rest/v1/modules/find-subsystem-by-clientid?clientId='+clientId+'&parentId='+parentId)
// }
