/*
 * @Author: your name
 * @Date: 2021-11-11 10:35:56
 * @LastEditTime: 2023-09-14 13:32:22
 * @LastEditors: code4eat awesomedema@gmail.com
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /KC-MiddlePlatform/service/login.ts
 */

import { request } from 'umi';


//获取公用字典数据
export const getPubDicData = async (code?: string) => {
    const resp = await request('/centerSys/sysdictdata/getDictData', {
        method: 'GET',
    });
    if (resp) {
        const result = resp.filter((a: any) => a.code == code);
        if (result.length > 0) {
            return Promise.resolve(result[0]);
        }
        return Promise.resolve([]);
    }

    return Promise.resolve([]);
};


