/*
 * @Author: zc
 * @Description: 
 * @version: 
 * @Date: 2022-10-21 09:01:22
 * @LastEditors: 
 * @LastEditTime: 2022-10-26 17:35:28
 */
import request from '/@/utils/request';
//  全局配置
import appConfig from "/@/utils/appConfig"
/* 
    示例：
  @baseURL
*/
export function useMenuApi() {
  return {
    downloadFile: (params?: object) => { //下载文件
      return request({
        responseType: "blob",
        url: "xxxx",
        method: "get",
        params,
        baseURL:appConfig.identityUrl // 请求地址  可以在不同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: `xxxx/${params}`,
        method: "get",
      });
    },
  };
}
