UNPKG

@tplc/business

Version:

121 lines (117 loc) 2.7 kB
import { LcbActionViewProps } from './components/lcb-action-view/types' export interface ActionView { title: string icon?: string link: LcbActionViewProps url?: string mode: number hotSpot?: { x: number y: number width: number height: number link: LcbActionViewProps }[] } export type IResData<T> = { code: number | string msg: string data: T } export interface DataSource { source?: 'remote' | 'context' | 'user' requestInfo?: { requestUrl: string requestParams: string } dynamicScope?: string /** 动态key */ dependKey?: string } export interface AddressCommunity { address?: string addressId?: string addressIntro?: string addressName?: string addressType?: number agentId?: string areaId?: string categoryName?: string cityId?: string createDate?: string defaultFlag?: boolean hotFlag?: boolean lastModifyDate?: string latitude?: string longitude?: string merchantHeadId?: string merchantId?: string openFlag?: boolean productWeightSort?: number provinceCityAreaType?: number provinceId?: string weightSort?: number } export interface LcbGlobal { http: { get<T>(url: string, query?: Record<string, any> | undefined): Promise<IResData<T>> post<T>( url: string, data?: Record<string, any> | undefined, hideLoadingToast?: boolean, ): Promise<IResData<T>> } navigateTo: (url: string) => void loadingStore?: () => { changeLoading: (path: string, loading: boolean) => void } userStore?: () => { userInfo: Record<string, any> updateUser: (data: Record<string, any>, isLogin?: boolean) => void getUser: () => void } constantsStore: () => { mainConfig?: Record<string, any> otherConfig?: Record<string, any> addressId?: string setAddressId: (addressId: string, switchType?: 'merchant' | 'address') => void getAddressId: () => string windowInfo: Ref<UniNamespace.GetWindowInfoResult> } messageStore?: () => { messageCount: number getCount: () => void } getIsTabbar: (route: string) => boolean layoutId: string internalPages: { webview: string search: string setting: string home: string orderList: string authPhone: string userEdit: string drawdown: string notification: string } } global { interface Uni { $lcb: LcbGlobal } } export interface TextRenderViewItem { items: { content?: string style?: Record<string, any> link?: LcbActionViewProps children?: TextRenderViewItem['items'] }[] style?: Record<string, any> } export interface DynamicOptions { keyFrom?: 'user' | 'context' dynamicKey?: string styleKey?: string }