Files
ruo-shan-cloud-pharmacy/typings/index.d.ts
T
2026-08-13 14:28:23 +08:00

50 lines
1.1 KiB
TypeScript

type PageItem = {
name: string;
props?: Record<string, any>;
styles?: Record<string, any>;
};
type PageType = {
[pageName: string]: PageItem[];
};
type TemplateType = {
pages: PageType;
items: string[];
};
type TabbarMapType = {
[pageName: string]: {
pagePath: string,
text: string,
title?: string,
iconPath: string,
selectedIconPath: string
}
}
interface IAppOption {
globalData: {
userInfo?: WechatMiniprogram.UserInfo,
isLogin?: boolean,
wasLogin?: boolean,
template?: TemplateType | null,
showStock?: boolean,
store?: any,
joinedArray: string[],
safeBottom: number,
safeTop: number,
tabbarMap?: TabbarMapType,
tabbarItems?: any[],
sseStore: any,
isModalShowing: Boolean
},
getPageParams?: (id: number) => any,
checkLoginState: () => boolean,
redirectLogin: () => any,
login: (value: string) => boolean,
getTemplate?: () => Promise<any>,
// serverSentEvents: () => void,
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback,
}