/** * 获取Token */ export declare const getToken: () => string | null; /** * 设置Token */ export declare const setToken: (access_token: string) => string; /** * 移除Token */ export declare const removeToken: () => null; /** * 获取当前语言 */ export declare const getLanguage: () => string; /** * 获取全局请求头 */ export declare const globalHeaders: () => { Authorization: string; clientid: string; }; export declare function setupHttp(options: { baseURL?: string; timeout?: number; clientId?: string; }): void; declare let service: any; /** * POST请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function postAction(url: string, parameter: any): Promise; /** * 通用HTTP请求方法 * @param url 请求地址 * @param parameter 请求参数 * @param method 请求方法 */ export declare function httpAction(url: string, parameter: any, method: string): Promise; /** * PUT请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function putAction(url: string, parameter: any): Promise; /** * GET请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function getAction(url: string, parameter: any): Promise; /** * DELETE请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function deleteAction(url: string, parameter: any): Promise; /** * 下载文件请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function downloadFile(url: string, parameter: any): Promise; /** * 上传文件请求方法 * @param url 请求地址 * @param parameter 请求参数 */ export declare function uploadFile(url: string, parameter: any): Promise; export declare const get: typeof getAction; export declare const post: typeof postAction; export declare const put: typeof putAction; export declare const del: typeof deleteAction; export declare const download: typeof downloadFile; export declare const upload: typeof uploadFile; export default service;