import { request } from '@umijs/max';
import { RespResult } from './core/ReqData';
import { Base64 } from 'js-base64';
import { CLIENT_ID, CLIENT_SECRET } from '@/utils/loginUtil/config';

/**
 *
 * @description 认证相关接口
 */
const IS_PROD = process.env.NODE_ENV === 'production' ? true : false;


export const reqBaseUrl = IS_PROD
  ? '/zzcc/apis'
  : `/apis`;

const urlProxyApis = (url: string) => {
  return `${reqBaseUrl}${url}`;
};


/**
 *
 * @description sso跳转
 */
export async function getSSOUrlApi(params:any) {
  return request<RespResult<any>>(
    urlProxyApis('/admin/sso/chen-du/sso-url'),
    {
      method: 'get',
      params
    }
  )
}