import request from '@/utils/request';
import { AxiosPromise } from 'axios';

/**
 * 字典数据视图对象
 */
export interface DictDataVO {
  dictCode?: number;
  dictSort?: number;
  dictLabel: string;
  dictValue: string;
  dictType: string;
  cssClass?: string;
  listClass?: string;
  isDefault?: string;
  status?: string;
  createTime?: string;
  remark?: string;
}

/**
 * 根据字典类型查询字典数据信息
 * PC端接口
 */
export function getDictByType(dictType: string): AxiosPromise<DictDataVO[]> {
  return request({
    url: '/pc/dict/type/' + dictType,
    method: 'get'
  });
}
