import { stringify } from 'qs';
import { request } from '@umijs/max';
import webpath from '@/utils/webPath';


export async function getNewTopForHomePage(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/homepage/getNewTop`, {
        method: 'POST',
        data:params,
    });
}

export async function getNoticeTopForHomePage(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/homepage/getNoticeTop`, {
        method: 'POST',
        data:params,
    });
}

export async function getProjectTopForHomePage(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/basicproject/getProjectTop`, {
        method: 'POST',
        data:params,
    });
}

export async function getApprovalTopForHomePage(params = {}) {
    return request(`/${webpath.portalwebpath}/web/api/service/homepage/getApprovalTop`, {
        method: 'POST',
        data:params,
    });
}

export async function getWeatherForHomePage(params = {}) {
    return request(`/${webpath.homeWeatherPath}/v3/weather/weatherInfo?${stringify(params)}`);
}
