Functions
Const base64ToBlob
- base64ToBlob(base64: any): Blob
-
Parameters
Returns Blob
Const base64ToFile
- base64ToFile(base64: any, fileName: any): File
-
Parameters
-
base64: any
-
fileName: any
Returns File
Const buildUUID
-
Returns string
Const clearLoginData
-
Returns void
Const convertBase64UrlToBlob
- convertBase64UrlToBlob(urlData: any): Blob
-
Parameters
Returns Blob
Const filterRepeat
- filterRepeat(arr: any[], fieldName: string): any[]
-
Parameters
-
arr: any[]
-
fieldName: string
Returns any[]
Const formateTimestamp
- formateTimestamp(timestamp: number | null, type?: string): string
-
Parameters
-
timestamp: number | null
-
Default value type: string = "YYYY年MM月DD日 hh:mm:ss"
Returns string
Const getCookie
- getCookie(cookieName: any): string
-
Parameters
Returns string
Const getDeviceType
-
Const getEnvironment
- getEnvironment(): "com-wx-mobile" | "com-wx-pc" | "wx-mobile" | "wx-pc" | "other"
-
Returns "com-wx-mobile" | "com-wx-pc" | "wx-mobile" | "wx-pc" | "other"
Const getFileData
- getFileData(optionName: string): { name: string; url: string }
-
Parameters
Returns { name: string; url: string }
Const getFromType
-
Parameters
Returns string
Const getIsComWx
-
Returns boolean
Const getIsDevelopment
- getIsDevelopment(): boolean
-
Returns boolean
Const getQueryString
- getQueryString(url: string, queryKey: string): string
-
Parameters
-
url: string
-
queryKey: string
Returns string
Const getQueryVariable
- getQueryVariable(variable: any): string | false
-
Parameters
Returns string | false
Const getTicket
- getTicket(): null | string
-
Returns null | string
Const getToken
- getToken(cacheType: string, key?: string): string
-
Parameters
-
cacheType: string
-
Default value key: string = "token"
Returns string
Const getWecomToken
- getWecomToken(): null | string
-
Returns null | string
isEmpty
- isEmpty(val: any): boolean
-
Parameters
Returns boolean
Const isImage
- isImage(type: string): boolean
-
Parameters
Returns boolean
randomString
- randomString(e: any): string
-
Parameters
Returns string
Const removeTicket
-
Returns void
Const removeToken
- removeToken(cacheType: string, key?: string): void
-
Parameters
-
cacheType: string
-
Default value key: string = "token"
Returns void
Const setTicket
- setTicket(jsapiTicket: any): void
-
Parameters
Returns void
Const uuid
- uuid(len: any, radix: any): string
-
Parameters
Returns string
Const validateTwoDecimal
- validateTwoDecimal(v: number | string): boolean
-
Parameters
Returns boolean
通用函数