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

2705 lines
74 KiB
TypeScript

5 months ago
// generate time:2017-08-23 21:12:06
// Type definitions for wx app
// Definitions by: hellopao <https://github.com/hellopao/wx.d.ts>
/************************************************
* *
* API *
* *
************************************************/
interface IAnimation {
/**
* 0~1
*/
opacity(value: number): IAnimation;
/**
*
*/
backgroundColor(color: string): IAnimation;
/**
* Number 使 px
*/
width(length: number): IAnimation;
/**
* Number 使 px
*/
height(length: number): IAnimation;
/**
* Number 使 px
*/
top(length: number): IAnimation;
/**
* Number 使 px
*/
left(length: number): IAnimation;
/**
* Number 使 px
*/
bottom(length: number): IAnimation;
/**
* Number 使 px
*/
right(length: number): IAnimation;
/**
* deg-180~180deg
*/
rotate(deg: number): IAnimation;
/**
* deg-180~180Xdeg
*/
rotateX(deg: number): IAnimation;
/**
* deg-180~180Ydeg
*/
rotateY(deg: number): IAnimation;
/**
* deg-180~180Zdeg
*/
rotateZ(deg: number): IAnimation;
/**
* transform-function rotate3d
*/
rotate3d(x: number, y: number, z: number, deg: number): IAnimation;
/**
* XYsxXsxYsy
*/
scale(sx: number, sy?: number): IAnimation;
/**
* Xsx
*/
scaleX(sx: number): IAnimation;
/**
* Ysy
*/
scaleY(sy: number): IAnimation;
/**
* Zsy
*/
scaleZ(sz: number): IAnimation;
/**
* XsxYsyZsz
*/
scale3d(sx: number, sy: number, sz: number): IAnimation;
/**
* XtxpxXtxYtypx
*/
translate(tx: number, ty?: number): IAnimation;
/**
* Xtxpx
*/
translateX(tx: number): IAnimation;
/**
* Ytxpx
*/
translateY(tx: number): IAnimation;
/**
* Ztxpx
*/
translateZ(tx: number): IAnimation;
/**
* XtxYtyZtzpx
*/
translate3d(tx: number, ty: number, tz: number): IAnimation;
/**
* -180~180YXaxXaxYay
*/
skew(ax: number, ay?: number): IAnimation;
/**
* -180~180YXax
*/
skewX(ax: number): IAnimation;
/**
* -180~180XYay
*/
skewY(ay: number): IAnimation;
/**
* transform-function matrix
*/
matrix(a, b, c, d, tx, ty): IAnimation;
/**
* transform-function matrix3d
*/
matrix3d(): IAnimation;
}
interface ICanvasContext {
/**
* , fillStyle black
*/
setFillStyle(color: string): void;
/**
* , fillStyle black
*/
setStrokeStyle(color: string): void;
/**
*
*/
setShadow(offsetX: number, offsetY: number, blur: number, color: string): void;
/**
* 线使 addColorStop()
*/
createLinearGradient(x0: number, y0: number, x1: number, y1: number): void;
/**
* 使 addColorStop()
*/
createCircularGradient(x: number, y: number, r: number): void;
/**
* stop stop color stop stop color 使 addColorStop()
*/
addColorStop(stop: number, color: string): void;
/**
* 线
*/
setLineCap(lineCap: 'butt' | 'round' | 'square'): void;
/**
* 线
*/
setLineJoin(lineJoin: 'bevel' | 'round' | 'miter'): void;
/**
* 线
*/
setLineWidth(lineWidth: number): void;
/**
*
*/
setMiterLimit(miterLimit: number): void;
/**
*
*/
rect(x: number, y: number, width: number, height: number): void;
/**
* setFillStyle()
*/
fillRect(x: number, y: number, width: number, height: number): void;
/**
* () setFillStroke() 线
*/
strokeRect(x: number, y: number, width: number, height: number): void;
/**
*
*/
clearRect(x: number, y: number, width: number, height: number): void;
/**
*
*/
fill(): void;
/**
*
*/
stroke(): void;
/**
*
*/
beginPath(): void;
/**
*
*/
closePath(): void;
/**
* 线
*/
moveTo(x: number, y: number): void;
/**
* 线
*/
lineTo(x: number, y: number): void;
/**
*
*/
arc(x: number, y: number, radius: number, startAngle: number, sweepAngle: number): void;
/**
* 线
*/
quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
/**
* 线
*/
bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void;
/**
*
*/
scale(scaleWidth: number/**横坐标缩放的倍数1 = 100%0.5 = 50%2 = 200%,依次类 */, scaleHeight: number/** 纵坐标轴缩放的倍数1 = 100%0.5 = 50%2 = 200%,依次类 */): void;
/**
*
*/
rotate(deg: number/**degrees * Math.PI/180degrees范围为0~360;旋转角度,以弧度计 */): void;
/**
*
*/
translate(x: number/**水平坐标平移量 */, y: number/**竖直坐标平移量 */): void;
/**
*
*/
fillText(text: string, x: number, y: number): void;
/**
*
*/
setFontSize(fontSize: number): void;
/**
*
*/
drawImage(imageResource: string, x: number, y: number, width: number, height: number): void;
/**
*
*/
setGlobalAlpha(alpha: number): void;
/**
*
*/
save(): void;
/**
*
*/
restore(): void;
/**
*
*/
draw(): void;
}
interface IAudioContext {
/**
*
*/
play: () => void;
/**
*
*/
pause: () => void;
/**
* s
*/
seek: (position: number) => void;
}
interface IVideoContext {
/**
*
*/
play: () => void;
/**
*
*/
pause: () => void;
/**
* s
*/
seek: (position: number) => void;
/**
* danmu text, color
*/
sendDanmu: (danmu: {text: string; color: string;}) => void;
}
interface IMapContext {
/**
* gcj02 wx.openLocation
*/
getCenterLocation: (obj: {
/**
* res = { longitude: "经度", latitude: "纬度"}
*/
success?: (res: {longitude: string; latitude: string}) => void;
/**
*
*/
fail?: () => void;
/**
*
*/
complete?: () => void;
}) => void;
/**
* mapshow-location使
*/
moveToLocation: () => void;
}
interface Application {
setData: (obj: any) => void;
}
interface AppConstructor {
new (): Application;
(opts: {
/**
* --
*/
onLaunch?: () => void;
/**
* --
*/
onShow?: () => void;
/**
* --
*/
onHide?: () => void;
[key: string]: any;
}): Application;
}
declare var App: AppConstructor;
declare function getApp(): Application;
declare function getCurrentPages(): Page[];
interface Page {
setData: (obj: any) => void;
}
interface PageConstructor {
new (): Page;
(opts: {
/**
*
*/
data?: any;
/**
*
*/
onLoad?: () => void;
/**
* --
*/
onReady?: () => void;
/**
* --
*/
onShow?: () => void;
/**
* --
*/
onHide?: () => void;
/**
* --
*/
onUnload?: () => void;
/**
* --
*/
onPullDownRefreash?: () => void;
/**
*
*/
onReachBottom?: () => void;
/**
*
*/
onShareAppMessage?: () => {
/**
* ,
*/
title: string;
/**
* ,
*/
desc: string;
/**
* path /
*/
path: string;
};
[key: string]: any;
}): Page;
}
declare var Page: PageConstructor;
declare var wx: {
// # 网络 #
request(obj: {
/**
*
*/
url: string;
/**
*
*/
data?: any | string;
/**
* header , header Referer
*/
header?: any;
/**
* GETOPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
*/
method?: string;
/**
* json dataType json JSON.parse
*/
dataType?: string;
/**
* res = {data: '开发者服务器返回的内容'}
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* wx.chooseImage HTTPS POST content-type multipart/form-data
*/
uploadFile(obj: {
/**
* url
*/
url: string;
/**
*
*/
filePath: string;
/**
* key , key
*/
name: string;
/**
* HTTP Header , header Referer
*/
header?: any;
/**
* HTTP form data
*/
formData?: any;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* HTTP GET
*/
downloadFile(obj: {
/**
* url
*/
url: string;
/**
* HTTP Header
*/
header?: any;
/**
* tempFilePath res = {tempFilePath: '文件的临时路径'}
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* WebSocket WebSocket WebSocket WebSocket
*/
connectSocket(obj: {
/**
* wss
*/
url: string;
/**
*
*/
data?: any;
/**
* HTTP Header , header Referer
*/
header?: any;
/**
* GET OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
*/
method?: string;
/**
*
*/
protocols?: string[];
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* WebSocket
*/
onSocketOpen(callback: Function): void;
/**
* WebSocket
*/
onSocketError(callback: Function): void;
/**
* WebSocket wx.connectSocket wx.onSocketOpen
*/
sendSocketMessage(obj: {
/**
*
*/
data: undefined;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* WebSocket
*/
onSocketMessage(callback: Function): void;
/**
* WebSocket
*/
closeSocket(obj: {
/**
* 1000
*/
code?: number;
/**
* 123UTF-8
*/
reason?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* WebSocket
*/
onSocketClose(callback: Function): void;
// # 媒体 #
/**
* 使
*/
chooseImage(obj: {
/**
* 9
*/
count?: number;
/**
* original compressed
*/
sizeType?: string[];
/**
* album camera 使
*/
sourceType?: string[];
/**
* tempFilePaths
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
previewImage(obj: {
/**
* urls
*/
current?: string;
/**
*
*/
urls: string[];
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
getImageInfo(obj: {
/**
*
*/
src: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
saveImageToPhotosAlbum(obj: {
/**
*
*/
filePath: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* wx.stopRecord1
*/
startRecord(obj: {
/**
* res = {tempFilePath: '录音文件的临时路径'}
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
stopRecord(): void;
/**
*
*/
playVoice(obj: {
/**
*
*/
filePath: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* wx.playVoice wx.stopVoice
*/
pauseVoice(): void;
/**
*
*/
stopVoice(): void;
/**
*
*/
getBackgroundAudioPlayerState(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 使
*/
playBackgroundAudio(obj: {
/**
* m4a, aac, mp3, wav
*/
dataUrl: string;
/**
*
*/
title?: string;
/**
* URL
*/
coverImgUrl?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
pauseBackgroundAudio(): void;
/**
*
*/
seekBackgroundAudio(obj: {
/**
*
*/
position: number;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
stopBackgroundAudio(): void;
/**
*
*/
onBackgroundAudioPlay(callback: Function): void;
/**
*
*/
onBackgroundAudioPause(callback: Function): void;
/**
*
*/
onBackgroundAudioStop(callback: Function): void;
getBackgroundAudioManager(): void;
/**
* audio audioContext
*/
createAudioContext(audioId: string): IAudioContext;
/**
*
*/
chooseVideo(obj: {
/**
* album camera 使['album', 'camera']
*/
sourceType?: string[];
/**
* 60
*/
maxDuration?: number;
/**
* front: back: back
*/
camera?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
saveVideoToPhotosAlbum(obj: {
/**
*
*/
filePath: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* video videoContext
*/
createVideoContext(videoId: string): IVideoContext;
// # 文件 #
/**
*
*/
saveFile(obj: {
/**
*
*/
tempFilePath: string;
/**
* res = {savedFilePath: '文件的保存路径'}
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
getSavedFileList(obj: {
/**
* success
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 使 wx.getFileInfo
*/
getSavedFileInfo(obj: {
/**
*
*/
filePath: string;
/**
* success
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
removeSavedFile(obj: {
/**
*
*/
filePath: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* doc, xls, ppt, pdf, docx, xlsx, pptx
*/
openDocument(obj: {
/**
* downFile
*/
filePath: string;
/**
* doc, xls, ppt, pdf, docx, xlsx, pptx
*/
fileType?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getFileInfo(obj: {
/**
*
*/
filePath: string;
/**
* md5md5sha1
*/
digestAlgorithm?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
// # 数据缓存 #
/**
* key key
*/
setStorage(obj: {
/**
* key
*/
key: string;
/**
*
*/
data: any;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* data key key
*/
setStorageSync(key: string, data: any, ): void;
/**
* key
*/
getStorage(obj: {
/**
* key
*/
key: string;
/**
* ,res = {data: key}
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* key
*/
getStorageSync(key: string): void;
/**
* storage
*/
getStorageInfo(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* storage
*/
getStorageInfoSync(): void;
/**
* key
*/
removeStorage(obj: {
/**
* key
*/
key: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* key
*/
removeStorageSync(key: string): void;
/**
*
*/
clearStorage(): void;
/**
*
*/
clearStorageSync(): void;
// # 位置 #
/**
*
*/
getLocation(obj: {
/**
* wgs84 gps gcj02 wx.openLocation
*/
type?: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
chooseLocation(obj: {
/**
*
*/
success: Function;
/**
*
*/
cancel?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 使
*/
openLocation(obj: {
/**
* -90~90
*/
latitude: number;
/**
* -180~180西
*/
longitude: number;
/**
* 5~1818
*/
scale?: number;
/**
*
*/
name?: string;
/**
*
*/
address?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* map mapContext
*/
createMapContext(mapId: string): IMapContext;
// # 设备 #
/**
*
*/
getSystemInfo(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
getSystemInfoSync(): void;
/**
*
*/
getNetworkType(obj: {
/**
* networkType
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
onNetworkStatusChange(callback: Function): void;
setScreenBrightness(obj: {
/**
* 0~10 1
*/
value: number;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getScreenBrightness(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
vibrateLong(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
vibrateShort(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 5/使 wx.stopAccelerometer
*/
onAccelerometerChange(callback: Function): void;
startAccelerometer(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
stopAccelerometer(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 5/使wx.stopCompass
*/
onCompassChange(callback: Function): void;
startCompass(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
stopCompass(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
makePhoneCall(obj: {
/**
*
*/
phoneNumber: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
scanCode(obj: {
/**
*
*/
onlyFromCamera?: boolean;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
setClipboardData(obj: {
/**
*
*/
data: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getClipboardData(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
openBluetoothAdapter(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
closeBluetoothAdapter(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getBluetoothAdapterState(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
onBluetoothAdapterStateChange(callback: Function): void;
startBluetoothDevicesDiscovery(obj: {
/**
* service uuid
*/
services?: Array<any>;
/**
* onDeviceFound RSSI
*/
allowDuplicatesKey?: boolean;
/**
* 0
*/
interval?: number;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
stopBluetoothDevicesDiscovery(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getBluetoothDevices(obj: {
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
onBluetoothDeviceFound(callback: Function): void;
getConnectedBluetoothDevices(obj: {
/**
* service uuid
*/
services: Array<any>;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
createBLEConnection(obj: {
/**
* id getDevices
*/
deviceId: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
closeBLEConnection(obj: {
/**
* id getDevices
*/
deviceId: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getBLEDeviceServices(obj: {
/**
* id getDevices
*/
deviceId: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getBLEDeviceCharacteristics(obj: {
/**
* id device
*/
deviceId: string;
/**
* uuid
*/
serviceId: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
readBLECharacteristicValue(obj: {
/**
* id device
*/
deviceId: string;
/**
* uuid
*/
serviceId: string;
/**
* uuid
*/
characteristicId: string;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
writeBLECharacteristicValue(obj: {
/**
* id device
*/
deviceId: string;
/**
* uuid
*/
serviceId: string;
/**
* uuid
*/
characteristicId: string;
/**
* vConsole ArrayBuffer
*/
value: undefined;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
notifyBLECharacteristicValueChange(obj: {
/**
* id device
*/
deviceId: string;
/**
* uuid
*/
serviceId: string;
/**
* uuid
*/
characteristicId: string;
/**
* true: notify; false: notify
*/
state: boolean;
/**
*
*/
success: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
onBLEConnectionStateChange(callback: Function): void;
onBLECharacteristicValueChange(callback: Function): void;
startBeaconDiscovery(obj: {
/**
* iBeacon广 uuids
*/
uuids: string[];
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
stopBeaconDiscovery(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getBeacons(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
onBeaconUpdate(callback: Function): void;
onBeaconServiceChange(callback: Function): void;
onUserCaptureScreen(callback: Function): void;
addPhoneContact(obj: {
/**
*
*/
photoFilePath?: string;
/**
*
*/
nickName?: string;
/**
*
*/
lastName?: string;
/**
*
*/
middleName?: string;
/**
*
*/
firstName: string;
/**
*
*/
remark?: string;
/**
*
*/
mobilePhoneNumber?: string;
/**
*
*/
weChatNumber?: string;
/**
*
*/
addressCountry?: string;
/**
*
*/
addressState?: string;
/**
*
*/
addressCity?: string;
/**
*
*/
addressStreet?: string;
/**
*
*/
addressPostalCode?: string;
/**
*
*/
organization?: string;
/**
*
*/
title?: string;
/**
*
*/
workFaxNumber?: string;
/**
*
*/
workPhoneNumber?: string;
/**
*
*/
hostNumber?: string;
/**
*
*/
email?: string;
/**
*
*/
url?: string;
/**
*
*/
workAddressCountry?: string;
/**
*
*/
workAddressState?: string;
/**
*
*/
workAddressCity?: string;
/**
*
*/
workAddressStreet?: string;
/**
*
*/
workAddressPostalCode?: string;
/**
*
*/
homeFaxNumber?: string;
/**
*
*/
homePhoneNumber?: string;
/**
*
*/
homeAddressCountry?: string;
/**
*
*/
homeAddressState?: string;
/**
*
*/
homeAddressCity?: string;
/**
*
*/
homeAddressStreet?: string;
/**
*
*/
homeAddressPostalCode?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
// # 界面 #
/**
*
*/
showToast(obj: {
/**
*
*/
title: string;
/**
* "success", "loading"
*/
icon?: string;
/**
* image icon
*/
image?: string;
/**
* 1500
*/
duration?: number;
/**
* 穿false
*/
mask?: boolean;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
showLoading(obj: {
/**
*
*/
title: string;
/**
* 穿false
*/
mask?: boolean;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
hideToast(): void;
hideLoading(): void;
/**
*
*/
showModal(obj: {
/**
*
*/
title: string;
/**
*
*/
content: string;
/**
* true
*/
showCancel?: boolean;
/**
* "取消" 4
*/
cancelText?: string;
/**
* "#000000"
*/
cancelColor?: undefined;
/**
* "确定" 4
*/
confirmText?: string;
/**
* "#3CC51F"
*/
confirmColor?: undefined;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
showActionSheet(obj: {
/**
* 6
*/
itemList: undefined;
/**
* "#000000"
*/
itemColor?: undefined;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
setTopBarText(obj: {
/**
*
*/
text: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
setNavigationBarTitle(obj: {
/**
*
*/
title: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
showNavigationBarLoading(): void;
/**
*
*/
hideNavigationBarLoading(): void;
/**
* 使wx.navigateBack
*/
navigateTo(obj: {
/**
* tabBar , 使?=& 'path?key=value&key2=value2'
*/
url: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
redirectTo(obj: {
/**
* tabBar 使?=& 'path?key=value&key2=value2'
*/
url: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
reLaunch(obj: {
/**
* , 使?=& 'path?key=value&key2=value2' tabBar
*/
url: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* tabBar tabBar
*/
switchTab(obj: {
/**
* tabBar app.json tabBar
*/
url: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* getCurrentPages())
*/
navigateBack(obj: {
/**
* delta
*/
delta?: number;
}): void;
/**
* animationexportanimation
*/
createAnimation(obj: {
/**
* 400
*/
duration?: number;
/**
* "linear"
*/
timingFunction?: string;
/**
* 0
*/
delay?: number;
/**
* "50% 50% 0"
*/
transformOrigin?: string;
}): IAnimation;
pageScrollTo(obj: {
/**
* px
*/
scrollTop: number;
}): void;
/**
* canvas canvasId.Tip: canvasId <canvas/>
*/
createCanvasContext(canvasId: string): ICanvasContext;
/**
*
*/
canvasToTempFilePath(canvasId: string): void;
startPullDownRefresh(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
stopPullDownRefresh(): void;
// # WXML节点信息 #
// # 第三方平台 #
getExtConfig(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getExtConfigSync(): void;
// # 开放接口 #
/**
* codeopenid session_key
*/
login(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* 使使wx.checkSessionwx.login
*/
checkSession(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
authorize(obj: {
/**
* scope scope
*/
scope: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
* withCredentials true wx.login
*/
getUserInfo(obj: {
/**
*
*/
withCredentials?: boolean;
/**
* zh_CN zh_TW en
*/
lang?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
/**
*
*/
requestPayment(obj: {
/**
* 19701100:00:00,
*/
timeStamp: string;
/**
* 32
*/
nonceStr: string;
/**
* prepay_id prepay_id=*
*/
package: string;
/**
* MD5
*/
signType: string;
/**
* ,;
*/
paySign: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
chooseAddress(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
addCard(obj: {
/**
*
*/
cardList: undefined;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
openCard(obj: {
/**
* openCard
*/
cardList: undefined;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
openSetting(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getSetting(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
getWeRunData(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
navigateToMiniProgram(obj: {
/**
* appId
*/
appId: string;
/**
*
*/
path?: string;
/**
* App.onLaunch()App.onShow()
*/
extraData?: any;
/**
* developtrialrelease release
*/
envVersion?: string;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
chooseInvoiceTitle(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
checkIsSupportSoterAuthentication(obj: {
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
// # 数据 #
/**
* 使
*/
reportAnalytics(eventName: string, data: string, ): void;
// # 拓展接口 #
arrayBufferToBase64(arrayBuffer: string): void;
base64ToArrayBuffer(base64: string): void;
// # 调试接口 #
setEnableDebug(obj: {
/**
*
*/
enableDebug: boolean;
/**
*
*/
success?: Function;
/**
*
*/
fail?: Function;
/**
*
*/
complete?: Function;
}): void;
}