You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

87 lines
1.8 KiB

interface globalSystemInfo extends WechatMiniprogram.SystemInfo {
capsulePosition: {
top: number
bottom: number
right: number
left: number
width: number
height: number
}
}
interface pickerItem {
id: string
value: string
}
interface ISpecItem {
giftId: string
specName: string
hysGoodsId: string
integral: string
unitPrice: string
stock: string
}
type pickerList = pickerItem[]
interface IAppOption {
globalData: {
url?: string
upFileUrl: string
imageUrl: string
Timestamp: number
waitBindDoctorId: string
// 扫码参数
pharmacistId?: string
projectId?: string
initLoginInfo: Partial<{
isLogin: 0 | 1
isReg: 0 | 1
isRegistered: 0 | 1
// 1-游客,2-患者端,3-地推人员端,4-药店人员端
loginType: 1 | 2 | 3 | 4
loginIdentity: 1 | 2 | 3 | 4
loginIdentityId: number
guestPrivacyAgree: boolean
token: string
sessionKey: string
openid: string
unionid: string
userId: number
}>
[propName: string]: any
}
startLogin: (callback?: () => void) => void
// types: 身份类型数组,如 [2, 3] 表示患者端和地推人员端都可以访问
waitLogin: (params?: { types?: number[] }) => Promise<void>
checkLoginTypes: (types: number[]) => boolean
mpBehavior: (data: { PageName: string; type?: 0 | 1 | 2 | 3 }) => void
globalSystemInfo?: globalSystemInfo
[propName: string]: any
}
interface Response<T> {
code: string
data: T
message: string
}
interface IAgaxParams extends WechatMiniprogram.RequestOption {
showMsg?: boolean
loading?: boolean
loadingText?: string
isJSON?: boolean
needToken?: boolean // 是否需要携带 token,默认 true
}
declare namespace WechatMiniprogram {
export interface Wx {
ajax: (params: IAgaxParams) => Promise<any>
}
}