import settings from '@/settings'
import request from '@/utils/request'
const systemPrefix = settings.systemPrefix

export  function getRole(params) {
  return request({
    url: `${systemPrefix}/automake/controller/system/login/SelectRoleNameController.do?userno=${params}`,
    method:'post'
  });
}

export function login(params) {
    let datas = {userno:params.username, pwd:params.password, login_role:params.login_role,loginPage:1}
    return request({
        url: `${systemPrefix}/automake/controller/system/login/LoginAction`,
        method: 'post',
        data:datas
    })
}

export function getMenuDataService(params){
    return request({
        url: `${systemPrefix}/workflow/category/list/Auth`,
        method: 'post',
        data:params
    })
}

export function getRoutes(){
    return request({
        url: `/__umiDev/routes`,
        method: 'get',
    })
}
