interface IAppOption { globalData: { url?: string upFileUrl: string imageUrl: string Timestamp: number waitBindDoctorId: string loginState: string initLoginInfo: Partial<{ isLogin: 0 | 1 isReg: 0 | 1 loginType: 1 | 2 }> [propName: string]: any } getUserInfo: (type?: 0 | 1 | 2) => Promise startLogin: (callback?: () => void) => void waitLogin: (params?: { type?: 0 | 1 | 2 | 'any' }) => Promise checkLoginType: (type: 0 | 1 | 2 | 'any') => boolean [propName: string]: any } interface IAgaxParams extends WechatMiniprogram.RequestOption { showMsg?: boolean loading?: boolean loadingText?: string isJSON?: boolean } declare namespace WechatMiniprogram { export interface Wx { ajax: (params: IAgaxParams) => Promise } }