diff --git a/mock/dict.mock.ts b/mock/dict.mock.ts index 9eff20e7..b04a3689 100644 --- a/mock/dict.mock.ts +++ b/mock/dict.mock.ts @@ -21,6 +21,27 @@ export default defineMock([ }, }, + /** + * 字典列表 + */ + { + url: "dicts", + method: ["GET"], + body: { + code: "00000", + data: { + list: [ + { + value: "gender", + label: "性别", + }, + ], + total: 1, + }, + msg: "一切ok", + }, + }, + // 新增字典 { url: "dicts", diff --git a/src/api/system/dict.api.ts b/src/api/system/dict.api.ts index f558a987..755ff062 100644 --- a/src/api/system/dict.api.ts +++ b/src/api/system/dict.api.ts @@ -21,6 +21,11 @@ const DictAPI = { }); }, + /** + * 字典列表 + * + * @returns 字典列表 + */ getList() { return request({ url: `${DICT_BASE_URL}`,