/*
 * @Author: zc
 * @description 
 * @version: 
 * @Date: 2022-10-21 09:01:22
 * @LastEditors: 
 * @LastEditTime: 2022-10-26 17:35:28
 */
import request from '/@/utils/request';
// 全局配置
/* 
    示例：
  @baseURL
*/
export function useMenuApi() {
  return {
    downloadFile: (params?: object) => { //下载文件
      return request({
        responseType: "blob",
        url: "xxxix",
        method: "get",
        params,
        baseURL:import.meta.env.VITE_API_IDENTITY_URL // 请求地址  可以在不同url中修改
      });
    },
    deleteToken: (params?: object) => { // 清除请求头 token
      return request({
        transformRequest: [
          (data: any, headers: any) => {
            delete headers.Authorization;
            return data;
          },
        ],
        headers: { "Content-Type": "application/x-www-form-urlencoded" },
        url: `xxxix/${params}`,
        method: "get",
      });
    },
  };
}
