百度智能小程序API文档(202003)
首页
白天
夜间
下载
阅读记录
书签管理
我的书签
添加书签
移除书签
编辑文档
开放接口
来源 1
浏览
710
扫码
打印
2020-03-07 14:32:43
用户信息
分享
全屏内容发布器
获取发票抬头 swan.chooseInvoiceTitle
页面基础信息
调试 swan.setEnableDebug
定时器
上一篇:
下一篇:
发布点评
错误码
AI
语音合成 swan.ai.textToAudio
图像审核 swan.ai.imageAudit
接入说明
文本审核 swan.ai.textReview
词法分析 swan.ai.nlpLexerCustom
人脸识别
swan.ai.faceMatch
swan.ai.facePersonIdmatch
swan.ai.faceLivenessSessioncode
swan.ai.faceSearch
swan.ai.facePersonVerify
swan.ai.faceDetect
图像识别
swan.ai.advancedGeneralIdentify
swan.ai.plantClassify
swan.ai.carClassify
swan.ai.objectDetectIdentify
swan.ai.dishClassify
swan.ai.animalClassify
swan.ai.logoClassify
文字识别
swan.ai.ocrVehicleLicense
swan.ai.ocrBankCard
swan.ai.ocrIdCard
swan.ai.ocrDrivingLicense
语音识别
swan.ai.getVoiceRecognizer
VoiceRecognizer
VoiceRecognizer.onRecognize
VoiceRecognizer.start
VoiceRecognizer.stop
VoiceRecognizer.onFinish
VoiceRecognizer.cancel
VoiceRecognizer.onError
VoiceRecognizer.onStart
API列表
位置
查看位置 swan.openLocation
地图组件控制
swan.createMapContext
MapContext
MapContext.translateMarker
MapContext.getRegion
MapContext.getCenterLocation
MapContext.includePoints
MapContext.moveToLocation
MapContext.getScale
获取位置
swan.getLocation
swan.stopLocationUpdate
swan.onLocationChange
swan.chooseLocation
swan.startLocationUpdate
swan.offLocationChange
基础
URL Query
swan.getURLQuery
onURLQueryChange
swan.setURLQuery
应用级事件
swan.offAppHide
swan.onAppHide
swan.offAppShow
swan.onError
swan.offError
swan.onAppShow
swan.offPageNotFound
swan.onPageNotFound
媒体
AR 相机组件控制
swan.createARCameraContext
ARCameraContext
ARCameraContext.startRecord
ARCameraContext.stopRecord
ARCameraContext.takePhoto
ARCameraContext.reset
图片
swan.previewImage
swan.chooseImage
swan.saveImageToPhotosAlbum
swan.compressImage
swan.chooseAlbum
swan.getImageInfo
录音管理
swan.getAvailableAudioSources
swan.getRecorderManager
RecorderManager
RecorderManager.onPause
RecorderManager.onStart
RecorderManager.onInterruptionBegin
RecorderManager.resume
RecorderManager.onError
RecorderManager.pause
RecorderManager.onStop
RecorderManager.stop
RecorderManager.onInterruptionEnd
RecorderManager.onResume
RecorderManager.start
直播组件控制
LivePlayerContext
LivePlayerContext.play
LivePlayerContext.exitFullScreen
LivePlayerContext.requestFullScreen
LivePlayerContext.pause
LivePlayerContext.resume
LivePlayerContext.stop
LivePlayerContext.mute
swan.createLivePlayerContext
相机组件控制
CameraContext
CameraContext.stopRecord
CameraContext.takePhoto
CameraContext.startRecord
swan.createCameraContext
背景音频管理播放
swan.getBackgroundAudioManager
BackgroundAudioManager
BackgroundAudioManager.onTimeUpdate
BackgroundAudioManager.onNext
BackgroundAudioManager.onSeeked
BackgroundAudioManager.play
BackgroundAudioManager.seek
BackgroundAudioManager.onPause
BackgroundAudioManager.onPrev
BackgroundAudioManager.onStop
BackgroundAudioManager.onCanplay
BackgroundAudioManager.onSeeking
BackgroundAudioManager.onEnded
BackgroundAudioManager.onPlay
BackgroundAudioManager.onError
BackgroundAudioManager.onWaiting
BackgroundAudioManager.pause
BackgroundAudioManager.stop
视频
swan.saveVideoToPhotosAlbum
swan.chooseVideo
视频组件控制
VideoContext
VideoContext.sendDanmu
VideoContext.stop
VideoContext.seek
VideoContext.hideStatusBar
VideoContext.exitFullScreen
VideoContext.requestFullScreen
VideoContext.pause
VideoContext.showStatusBar
VideoContext.play
VideoContext.playbackRate
swan.createVideoContext
透明视频组件控制
AnimationVideo
AnimationVideo.play
AnimationVideo.pause
AnimationVideo.seek
swan.createAnimationVideo
音频组件控制
swan.createInnerAudioContext
swan.setInnerAudioOption
InnerAudioContext
InnerAudioContext.onStop
InnerAudioContext.seek
InnerAudioContext.offTimeUpdate
InnerAudioContext.offCanplay
InnerAudioContext.offWaiting
InnerAudioContext.onSeeked
InnerAudioContext.onWaiting
InnerAudioContext.offStop
InnerAudioContext.onEnded
InnerAudioContext.stop
InnerAudioContext.onError
InnerAudioContext.onCanplay
InnerAudioContext.offPause
InnerAudioContext.pause
InnerAudioContext.offError
InnerAudioContext.destroy
InnerAudioContext.onSeeking
InnerAudioContext.onPlay
InnerAudioContext.play
InnerAudioContext.onTimeUpdate
InnerAudioContext.offEnded
InnerAudioContext.offSeeked
InnerAudioContext.offSeeking
InnerAudioContext.offPlay
InnerAudioContext.onPause
开放接口
选择收货地址 swan.chooseAddress
分包预下载 swan.loadSubPackage
百度收银台支付 swan.requestPolymerPayment
风控 swan.getSystemRiskInfo
获取发票抬头 swan.chooseInvoiceTitle
调试 swan.setEnableDebug
数据分析 swan.reportAnalytics
订阅 swan.subscribeService
全屏内容发布器
swan.openCommunityEditor
swan.closeCommunityEditor
分享
onShareAppMessage
swan.openShare
web-view中的分享
swan.shareFile
半屏内容发布器
swan.closeReplyEditor
swan.openReplyEditor
定时器
setTimeout
setInterval
clearInterval
clearTimeout
打开小程序
swan.navigateBackSmartProgram
swan.navigateToSmartProgram
授权
需授权接口列表
获取用户授权设置
swan.authorize
更新
UpdateManager
UpdateManager.applyUpdate
UpdateManager.onCheckForUpdate
UpdateManager.onUpdateFailed
UpdateManager.onUpdateReady
swan.getUpdateManager
用户信息
signature 计算方法
swan.getUserInfo
swan.getSwanId
swanid机制说明
登录
swan.isLoginSync
授权流程说明
getunionid
用户数据的签名验证和加解密
Session Key
swan.login
swan.checkSession
设置
swan.getSetting
swan.openSetting
页面基础信息
swan.setMetaKeywords
swan.setMetaDescription
swan.setPageInfo
swan.setDocumentTitle
数据存储
存储数据
swan.setStorageSync
swan.getStorageSync
swan.getStorage
swan.getStorageInfo
数据缓存流程
swan.getStorageInfoSync
swan.setStorage
存储清理
swan.removeStorage
swan.clearStorage
swan.removeStorageSync
swan.clearStorageSync
文件
打开新的文件页面 swan.openDocument
删除文件 swan.removeSavedFile
保存、获取文件
swan.getSavedFileList
swan.saveFile
swan.getFileInfo
swan.getSavedFileInfo
文件系统
FileSystemManager
FileSystemManager.removeSavedFile
FileSystemManager.writeFileSync
FileSystemManager.writeFile
FileSystemManager.renameSync
FileSystemManager.rename
FileSystemManager.readdirSync
FileSystemManager.unlink
FileSystemManager.getSavedFileList
FileSystemManager.unzip
FileSystemManager.statSync
FileSystemManager.mkdirSync
FileSystemManager.rmdir
FileSystemManager.readFile
FileSystemManager.appendFileSync
FileSystemManager.access
FileSystemManager.readdir
FileSystemManager.rmdirSync
FileSystemManager.copyFile
FileSystemManager.mkdir
FileSystemManager.readFileSync
FileSystemManager.copyFileSync
FileSystemManager.appendFile
FileSystemManager.saveFileSync
FileSystemManager.saveFile
FileSystemManager.getFileInfo
FileSystemManager.accessSync
FileSystemManager.stat
FileSystemManager.unlinkSync
swan.getFileSystemManager
界面
自定义组件 swan.nextTick
菜单 swan.getMenuButtonBoundingClientRect
添加到我的小程序引导 swan.showFavoriteGuide
位置 swan.pageScrollTo
下拉刷新
onPullDownRefresh
swan.stopPullDownRefresh
swan.startPullDownRefresh
交互反馈
swan.hideToast
swan.hideLoading
swan.showLoading
swan.showActionSheet
swan.showToast
swan.showModal
动画
Animation
Animation.translate3d
Animation.rotate3d
Animation.rotateZ
Animation.scaleZ
Animation.skewX
Animation.skewY
Animation.translateZ
Animation.matrix3d
Animation.skew
Animation.scale3d
Animation.translateY
Animation.rotate
Animation.rotateX
Animation.translate
Animation.matrix
Animation.translateX
Animation.scaleX
Animation.rotateY
Animation.scale
Animation.scaleY
swan.createAnimation
导航
swan.switchTab
swan.navigateBack
swan.reLaunch
swan.navigateTo
swan.redirectTo
导航栏
swan.setNavigationBarTitle
swan.showNavigationBarLoading
swan.hideNavigationBarLoading
swan.setNavigationBarColor
绘图
CanvasContext
CanvasContext.arc
CanvasContext.setLineDashOffset
CanvasContext.rotate
CanvasContext.fillRect
CanvasContext.beginPath
CanvasContext.setGlobalAlpha
CanvasContext.draw
CanvasContext.setFontSize
CanvasContext.moveTo
CanvasContext.clearRect
CanvasContext.quadraticCurveTo
CanvasContext.closePath
CanvasContext.fill
CanvasContext.setLineCap
CanvasContext.drawImage
CanvasContext.strokeText
CanvasContext.bezierCurveTo
CanvasContext.translate
CanvasContext.setTextAlign
CanvasContext.restore
CanvasContext.createCircularGradient
CanvasContext.lineTo
CanvasContext.font
CanvasContext.measureText
CanvasContext.rect
CanvasContext.clip
CanvasContext.save
CanvasContext.setLineDash
CanvasContext.setMiterLimit
CanvasContext.setLineWidth
CanvasContext.setLineJoin
CanvasContext.stroke
CanvasContext.strokeRect
CanvasContext.setFillStyle
CanvasContext.setShadow
CanvasContext.fillText
CanvasContext.setStrokeStyle
CanvasContext.createLinearGradient
CanvasContext.setTransform
CanvasContext.setTextBaseline
CanvasContext.scale
swan.canvasGetImageData
CanvasGradient
CanvasGradient.addColorStop
canvas
swan.canvasToTempFilePath
swan.createCanvasContext
swan.canvasPutImageData
背景
swan.setBackgroundColor
swan.setBackgroundTextStyle
节点信息
NodesRef
NodesRef.fields
NodesRef.scrollOffset
NodesRef.boundingClientRect
IntersectionObserver
IntersectionObserver.observe
IntersectionObserver.relativeTo
IntersectionObserver.relativeToViewport
IntersectionObserver.disconnect
SelectorQuery
SelectorQuery.selectAll
SelectorQuery.selectViewport
SelectorQuery.in
SelectorQuery.select
SelectorQuery.exec
swan.createSelectorQuery
swan.createIntersectionObserver
设置tabBar
swan.hideTabBar
swan.showTabBarRedDot
swan.showTabBar
swan.setTabBarBadge
swan.hideTabBarRedDot
swan.setTabBarStyle
swan.setTabBarItem
swan.removeTabBarBadge
第三方平台
获取第三方平台数据
swan.getExtConfigSync
swan.getExtConfig
网络
使用注意事项
WebSocket
swan.closeSocket
swan.onSocketError
swan.onSocketOpen
swan.onSocketMessage
swan.sendSocketMessage
swan.onSocketClose
SocketTask
SocketTask.send
SocketTask.onError
SocketTask.onMessage
SocketTask.close
SocketTask.onOpen
SocketTask.onClose
swan.connectSocket
上传、下载
DownloadTask
DownloadTask.abort
DownloadTask.onProgressUpdate
swan.downloadFile
UploadTask
UploadTask.onProgressUpdate
UploadTask.abort
swan.uploadFile
请求
swan.request
RequestTask
RequestTask.abort
设备
用户截屏事件 swan.onUserCaptureScreen
内存 swan.onMemoryWarning
手机联系人 swan.addPhoneContact
扫码 swan.scanCode
拨打电话 swan.makePhoneCall
剪贴板
swan.setClipboardData
swan.getClipboardData
加速度计
swan.startAccelerometer
swan.onAccelerometerChange
swan.stopAccelerometer
在系统日历中新建日程
swan.addEventOnCalendar
swan.deleteEventOnCalendar
屏幕亮度
swan.setScreenBrightness
swan.getScreenBrightness
swan.setKeepScreenOn
振动
swan.vibrateShort
swan.vibrateLong
系统信息
swan.canIUse
swan.getSystemInfoSync
swan.getSystemInfo
swan.getEnvInfoSync
网络状态
swan.onNetworkStatusChange
swan.getNetworkType
罗盘
swan.stopCompass
swan.onCompassChange
swan.startCompass
获取电量信息
swan.getBatteryInfoSync
swan.getBatteryInfo
设备方向
swan.startDeviceMotionListening
swan.onDeviceMotionChange
swan.stopDeviceMotionListening
暂无相关搜索结果!
本文档使用
全库网
构建
×
思维导图备注
×
文章二维码
手机扫一扫,轻松掌上读
×
文档下载
请下载您需要的格式的文档,随时随地,享受汲取知识的乐趣!
PDF
文档
EPUB
文档
MOBI
文档
×
书签列表
×
阅读记录
阅读进度:
0.00%
(
0/0
)
重置阅读进度