import axios from 'axios';

import request from '@/utils/request';
const baseURL = process.env.VUE_APP_BASE_API;

// 获取portal配置
export async function getSsoInfo() {
  let res = await axios({ method: 'get', url: baseURL + '/portal/cfg/cfg' });
  let cfg =
    res.status === 200 &&
    res.data &&
    res.data.code === '000000' &&
    res.data.data;
  console.log('cfg', cfg);
  return cfg;
}

export function fetchSSOConfigInfo() {
  return request({
    url: '/portal/cfg/cfg',
    method: 'get'
  });
}
