/*
 * @Author: zuolingling zuolingling@jsnangao.com
 * @Date: 2023-08-09 13:52:06
 * @LastEditors: zuolingling zuolingling@jsnangao.com
 * @LastEditTime: 2023-08-10 09:19:40
 * @FilePath: \iot-platform\portal\src\api\doFetch.js
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 */
import request from './request';
import bodyParse from './bodyParse';
export async function postFetch({ url, params }) {
    return request(url, {
        method: 'POST',
        data: params,
    });
}
export async function getFetchEcharts({ url, params }) {
    console.log(url,params);
    return request(url +params,{
        method: 'GET'
    });
}
export async function getFetch({ url, params }) {
    return request(url + bodyParse(params),{
        method: 'GET'
    });
}
export async function getDownload({ url, params }) {
    return request(url + bodyParse(params), {
        method: 'GET',
        responseType: 'blob'
    });
}
export async function formFetch({ url, params }) {
    return request(url, {
        method: 'POST',
        data: params,
        type: 'form',
    });
}