user.js 774 Bytes
/*
 * @Description:
 * @Autor: renchao
 * @LastEditTime: 2023-03-24 09:28:25
 */
import request from '@/utils/request'
// let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
/**
 * @description: 获取用户信息
 * @author: renchao
 */
export function getUserInfo () {
  return request({
    url: SERVER.SERVERAPI + '/rest/user/getUserInfo',
    method: 'get',
  })
}

/**
 * @description: 获取菜单信息
 * @param {*} data
 * @author: renchao
 */
export function getMenuInfo (data) {
  return request({
    url: SERVER.SERVERAPI + '/rest/user/getUserAuthorizationMenus',
    method: 'get',
    params: {
      productCode: data,
    },
  })
}