Commit b387681c00ac018f5bc6a9251009ddffe37acae6

Authored by 无木
1 parent 2c5351f9

fix(api): select api type error

src/api/demo/model/optionsModel.ts
@@ -8,4 +8,4 @@ export interface DemoOptionsItem { @@ -8,4 +8,4 @@ export interface DemoOptionsItem {
8 /** 8 /**
9 * @description: Request list return value 9 * @description: Request list return value
10 */ 10 */
11 -export type DemoOptionsGetResultModel = BasicFetchResult<DemoOptionsItem[]>; 11 +export type DemoOptionsGetResultModel = BasicFetchResult<DemoOptionsItem>;
src/api/demo/select.ts
1 import { defHttp } from '/@/utils/http/axios'; 1 import { defHttp } from '/@/utils/http/axios';
2 -import { DemoOptionsGetResultModel } from './model/optionsModel';  
3 - 2 +import { DemoOptionsItem } from './model/optionsModel';
4 enum Api { 3 enum Api {
5 OPTIONS_LIST = '/select/getDemoOptions', 4 OPTIONS_LIST = '/select/getDemoOptions',
6 } 5 }
@@ -8,5 +7,4 @@ enum Api { @@ -8,5 +7,4 @@ enum Api {
8 /** 7 /**
9 * @description: Get sample options value 8 * @description: Get sample options value
10 */ 9 */
11 -export const optionsListApi = () =>  
12 - defHttp.get<DemoOptionsGetResultModel>({ url: Api.OPTIONS_LIST }); 10 +export const optionsListApi = () => defHttp.get<DemoOptionsItem[]>({ url: Api.OPTIONS_LIST });