refactor(projects): axios封装完成

This commit is contained in:
Soybean
2021-11-23 00:23:43 +08:00
parent 451c7547af
commit 03b398af2f
21 changed files with 332 additions and 145 deletions

View File

@ -0,0 +1,23 @@
import type { ResponseDictionary, Dictionary } from '@/interface';
export function fecthDictionaryMiddleware(data: ResponseDictionary[]): Dictionary[] {
return data.map(item => {
const {
modelName: label,
modelCharactorName: charactorLabel,
modelIndicator: indicatorKey,
modelIndicatorName: indicatorLabel,
remarks: remark,
formula
} = item;
return {
label,
charactorLabel,
indicatorKey,
indicatorLabel,
remark,
formula
};
});
}