| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- export type ApiMethod = 'get' | 'post';
- export type PageKind =
- | 'home'
- | 'account'
- | 'article'
- | 'login'
- | 'resource'
- | 'form'
- | 'learning'
- | 'game'
- | 'product'
- | 'productList'
- | 'checkout'
- | 'order'
- | 'finance'
- | 'appointment'
- | 'courseCenter'
- | 'studyRecords'
- | 'team'
- | 'merchant'
- | 'webview'
- | 'support'
- | 'supportFeedback';
- export interface ApiEnvelope<T = unknown> {
- retcode: number;
- retmsg?: string;
- result: T;
- addon?: unknown;
- page?: {
- itemCount?: number;
- pageCount?: number;
- pageIndex?: number;
- pageSize?: number;
- [key: string]: unknown;
- };
- }
- export interface AppUser {
- userId: number;
- userName?: string;
- honeyName?: string;
- userFace?: string;
- mobile?: string;
- groupId?: number;
- groupName?: string;
- purse?: number;
- point?: number;
- silverCoin?: number;
- [key: string]: unknown;
- }
- export interface ApiBinding {
- action: string;
- method?: ApiMethod;
- params?: Record<string, string | number | boolean>;
- resultPath?: string;
- queryMap?: Record<string, string>;
- }
- export interface FormField {
- key: string;
- label: string;
- type?: 'text' | 'password' | 'tel' | 'number' | 'email' | 'textarea' | 'select' | 'date' | 'file' | 'checkbox';
- required?: boolean;
- placeholder?: string;
- options?: Array<{ label: string; value: string | number }>;
- }
- export interface PageAction {
- key?: string;
- label: string;
- action: string;
- method?: ApiMethod;
- tone?: 'primary' | 'danger' | 'quiet';
- confirm?: string;
- fields?: FormField[];
- scope?: 'page' | 'item';
- params?: Record<string, string | number | boolean>;
- when?: Record<string, string | number | boolean>;
- success?: 'reload' | 'remove-item' | 'none';
- }
- export interface PageMeta {
- path: string;
- title: string;
- domain: 'home' | 'shop' | 'learn' | 'history' | 'member' | 'support' | 'game' | 'system';
- kind: PageKind;
- auth?: boolean;
- hideHeader?: boolean;
- hideBack?: boolean;
- hideTabbar?: boolean;
- api?: ApiBinding;
- fields?: FormField[];
- saveAction?: string;
- deleteAction?: string;
- itemRoute?: string;
- queryKey?: string;
- emptyText?: string;
- description?: string;
- actions?: PageAction[];
- tabs?: string[];
- tabActions?: string[];
- tabParams?: Array<Record<string, string | number | boolean>>;
- onLoadActions?: ApiBinding[];
- }
- export interface NavItem {
- path: string;
- label: string;
- icon: string;
- roles?: number[];
- }
|