import { request } from '@umijs/max';

/**
 *
 * @param url 接口地址
 * @returns 城市风险 city-sjdz-base
 */
const IS_PROD = process.env.NODE_ENV === 'production' ? true : false;
export const reqBaseUrl = IS_PROD
  ? '/cd-comprehensive/apis/information'
  : '/apis/information';
const urlProxyApis = (url: string) => {
  return `${reqBaseUrl}${url}`;
};

// 获取安全一张图右侧文章
export async function getArticleList(params:any): Promise<any> {
  return request(
    urlProxyApis(`/article/list`),{
        params
    }
  );
}

export async function getArticleDetail(params:any): Promise<any> {
  return request(
    urlProxyApis(`/article/detail`),{
        params
    }
  );
}
