import request from '@/utils/require'

import { User,loginUrl,baseServer,menus,dict } from '@/api/index'




/* 用户信息*/
export function userInfo() {
  return request({
    url: `http://192.168.80.230:11031/login/userinfo`,
    method: 'post',
    data: ''
  })
}
// 登出
export function logout(token) {
  return request({
    url: `${User}/user/logout`,
    method: 'post',
    params: { token }
  })
}

// 获取综合业务菜单林艳飞
export function getAllmenus(codes) {
  return request({
    url: `${loginUrl}/roleResources/findRoleResourcesTree?resourcesCode=RM1001007&roleCode=${codes}`,
    // url: `${User}/roleResources/findRoleResourcesTree?roleCode=${codes}`,
    method: 'post'
  })
}
// log
export function menuChange(data) {
  return request({
    url: `${menus}/systemLog/producer`,
    method: 'post',
    data:data
  })
}

// 获取企业信息代码
export function getTyxydm(qyjgdm) {
  return request({
    url: `${baseServer}/organization/${qyjgdm}`,
    method: 'get'
  })
}

//导航菜单
export function getInfo() {
  return request({
    url: `${User}/user/getCurrUserinfo`,
    method: 'get'
  })
}
//地区
export function cityDetain(){
  return request({
    url:`${dict}/dataDictionary/getDataGroup?groupId=AREA_CODE&pdictCode=120000`,
    method:'get'
  })
}

