mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
refactor(projects): axios封装完成
This commit is contained in:
23
src/service/middleware/demo.ts
Normal file
23
src/service/middleware/demo.ts
Normal 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
|
||||
};
|
||||
});
|
||||
}
|
Reference in New Issue
Block a user