UNPKG

@tplc/business

Version:

75 lines (67 loc) 1.59 kB
import { FilterTabsProps } from './components/FilterTabs/type' import { Option } from './types' export interface LcbListInfo { url: string baseParam?: Record<string, unknown> } export interface LcbFilterResult { btnComponent: BtnComponent filterTags: FilterTags[] filterComponent: FilterComponent[] listInfo: LcbListInfo filterTabs?: { componentProps: FilterTabsProps valueName: string sortType?: boolean defaultValue?: string } } export interface FilterComponent { filterName?: string component: string defaultValue?: string defaultName?: string valueName: string sortType?: boolean componentProps: FilterComponentProps } interface FilterComponentProps { mode?: 'multiple' | 'single' apiPath?: string options?: Option[] componentList?: ComponentList[] } export interface ComponentList { filterName: string component: string valueName: string sortType?: boolean defaultValue?: string | string[] | number[] componentProps: FilterTagsProps } export interface FilterTags { component: string valueName: string sortType?: boolean defaultValue?: string defaultName?: string componentProps: FilterTagsProps } export interface FilterTagsProps { mode?: 'multiple' | 'single' max: number min: number apiPath: string options: Option[] unit?: string step?: number valueName: string sortType?: boolean } interface BtnComponent { postRequest: string } export const getFilterDetail = (val: string) => uni.$lcb.http.post<LcbFilterResult>('/pageDecoration/list/detail', { pageListType: val, })