跳至内容

微信小程序开发指南

微信小程序商城及小程序开发平台定制开发服务,助力企业快速上线小程序应用。

  • 微信小程序介绍
    • 客服功能使用指南
      • 一、功能介绍
      • 七、客服子商户
      • 三、调用客服消息接口发送客服消息
      • 二、下发条件说明
      • 五、使用规范
      • 六、开发文档
      • 四、客服工具
    • 微信小程序接入指南
      • 一、微信小程序注册
      • 七、公众号关联微信小程序
      • 三、代码审核与发布
      • 九、硬件设备关联微信小程序
      • 二、微信小程序信息完善及开发前准备
      • 五、微信小程序申请微信支付
      • 八、在企业微信中使用微信小程序
      • 六、微信小程序绑定微信开放平台账号
      • 四、微信小程序申请微信认证
    • 扫码打开微信小程序接入指南
      • 一、功能介绍
      • 三、二维码跳转规则
      • 二、开放范围
      • 五、配置流程
      • 四、二维码内容获取
    • 插件接入指南
      • 一、开发插件
      • 三、使用插件
      • 二、插件支付功能
    • 搜索接入指南
      • 内容接入
      • 服务信息要求
      • 服务直达
      • 概述
      • 超级品牌专区
      • 附录
  • 微信小程序开发
    • API
      • 基础
        • wx.arrayBufferToBase64
        • wx.canIUse
        • 分包加载
          • wx.preDownloadSubpackage
          • 微信小程序预下载分包任务
            • PreDownloadSubpackageTask.onProgressUpdate
        • 加密
          • CryptoManager
            • CryptoManager.getLatestUserKey
            • CryptoManager.getRandomValues
          • wx.getUserCryptoManager
        • 微信小程序
          • 应用级事件
            • wx.offAppHide
            • wx.offAppShow
            • wx.offAudioInterruptionBegin
            • wx.offAudioInterruptionEnd
            • wx.offError
            • wx.offLazyLoadError
            • wx.offPageNotFound
            • wx.offThemeChange
            • wx.offUnhandledRejection
            • wx.onAppHide
            • wx.onAppShow
            • wx.onAudioInterruptionEnd
            • wx.onError
            • wx.onLazyLoadError
            • wx.onPageNotFound
            • wx.onThemeChange
            • wx.onUnhandledRejection
            • wx.postMessageToReferrerMiniProgram
            • wx.postMessageToReferrerPage
            • 微信小程序监听音频中断开始
          • 生命周期
            • wx.getApiCategory
            • wx.getEnterOptionsSync
            • wx.getLaunchOptionsSync
            • wx.offApiCategoryChange
            • wx.onApiCategoryChange
          • 路由事件
            • wx.offAfterPageLoad
            • wx.offAfterPageUnload
            • wx.offAppRoute
            • wx.offAppRouteDone
            • wx.offBeforeAppRoute
            • wx.offBeforePageLoad
            • wx.offBeforePageUnload
            • wx.onAfterPageLoad
            • wx.onAfterPageUnload
            • wx.onAppRoute
            • wx.onAppRouteDone
            • wx.onBeforeAppRoute
            • wx.onBeforePageLoad
            • wx.onBeforePageUnload
        • 微信小程序 base64ToArrayBuffer
        • 微信小程序 wx.env
        • 性能
          • EntryList
            • EntryList.getEntries
            • EntryList.getEntriesByName
            • EntryList.getEntriesByType
          • Performance
            • Performance.createObserver
            • Performance.getEntries
            • Performance.getEntriesByName
            • Performance.getEntriesByType
            • Performance.setBufferSize
          • PerformanceEntry
          • PerformanceObserver
            • PerformanceObserver.disconnect
            • PerformanceObserver.observe
          • wx.cancelIdleCallback
          • wx.getPerformance
          • wx.preloadAssets
          • wx.preloadSkylineView
          • wx.preloadWebview
          • wx.reportPerformance
          • wx.requestIdleCallback
        • 更新
          • PluginUpdateManager
            • PluginUpdateManager.onCheckForUpdate
            • PluginUpdateManager.onUpdateFailed
            • PluginUpdateManager.onUpdateReady
          • UpdateManager
            • UpdateManager.applyUpdate
            • UpdateManager.onCheckForUpdate
            • UpdateManager.onUpdateFailed
            • UpdateManager.onUpdateReady
          • wx.getPluginUpdateManager
          • wx.getUpdateManager
          • 微信小程序 wx.updateWeChatApp
        • 系统
          • wx.getAppAuthorizeSetting
          • wx.getAppBaseInfo
          • wx.getDeviceBenchmarkInfo
          • wx.getDeviceInfo
          • wx.getRendererUserAgent
          • wx.getSkylineInfo
          • wx.getSkylineInfoSync
          • wx.getSystemInfo
          • wx.getSystemInfoAsync
          • wx.getSystemInfoSync
          • wx.getSystemSetting
          • wx.getWindowInfo
          • wx.openAppAuthorizeSetting
          • wx.openSystemBluetoothSetting
        • 调试
          • console
            • console.debug
            • console.error
            • console.group
            • console.info
            • console.log
            • console.warn
            • 微信小程序console.groupEnd
          • LogManager
            • LogManager.log
            • LogManager.warn
            • 微信小程序 LogManager.debug
            • 微信小程序 LogManager.info
          • RealtimeLogManager
            • RealtimeLogManager.addFilterMsg
            • RealtimeLogManager.getCurrentState
            • RealtimeLogManager.info
            • RealtimeLogManager.setFilterMsg
            • RealtimeLogManager.tag
            • RealtimeLogManager.warn
            • 微信小程序RealtimeLogManager.error
            • 微信小程序RealtimeLogManager.in
          • RealtimeTagLogManager
            • RealtimeTagLogManager.addFilterMsg
            • RealtimeTagLogManager.error
            • RealtimeTagLogManager.info
            • RealtimeTagLogManager.warn
            • TagLogManager.setFilterMsg
          • wx.getLogManager
          • wx.setEnableDebug
          • 微信小程序 wx.getRealtimeLogManager
      • 媒体
        • 图片
          • wx.chooseImage
          • wx.chooseMessageFile
          • wx.compressImage
          • wx.cropImage
          • wx.editImage
          • wx.getImageInfo
          • wx.previewImage
          • wx.previewMedia
          • wx.saveImageToPhotosAlbum
        • 地图
          • MapContext
            • MapContext.addArc
            • MapContext.addCustomLayer
            • MapContext.addGroundOverlay
            • MapContext.addMarkers
            • MapContext.addVisualLayer
            • MapContext.eraseLines
            • MapContext.executeVisualLayerCommand
            • MapContext.fromScreenLocation
            • MapContext.getCenterLocation
            • MapContext.getRegion
            • MapContext.getRotate
            • MapContext.getScale
            • MapContext.getSkew
            • MapContext.includePoints
            • MapContext.initMarkerCluster
            • MapContext.moveAlong
            • MapContext.moveToLocation
            • MapContext.on
            • MapContext.openMapApp
            • MapContext.removeArc
            • MapContext.removeCustomLayer
            • MapContext.removeGroundOverlay
            • MapContext.removeMarkers
            • MapContext.removeVisualLayer
            • MapContext.setBoundary
            • MapContext.setCenterOffset
            • MapContext.setLocMarkerIcon
            • MapContext.toScreenLocation
            • MapContext.translateMarker
            • MapContext.updateGroundOverlay
          • wx.createMapContext
        • 实时音视频
          • LivePlayerContext
            • LivePlayerContext.exitBackgroundPlayback
            • LivePlayerContext.exitCasting
            • LivePlayerContext.exitFullScreen
            • LivePlayerContext.exitPictureInPicture
            • LivePlayerContext.mute
            • LivePlayerContext.pause
            • LivePlayerContext.play
            • LivePlayerContext.reconnectCasting
            • LivePlayerContext.requestBackgroundPlayback
            • LivePlayerContext.requestFullScreen
            • LivePlayerContext.resume
            • LivePlayerContext.snapshot
            • LivePlayerContext.startCasting
            • LivePlayerContext.stop
            • LivePlayerContext.switchCasting
          • LivePusherContext
            • LivePusherContext.applyBlusherStickMakeup
            • LivePusherContext.applyEyeBrowMakeup
            • LivePusherContext.applyEyeShadowMakeup
            • LivePusherContext.applyFaceContourMakeup
            • LivePusherContext.applyFilter
            • LivePusherContext.applyLipStickMakeup
            • LivePusherContext.applySticker
            • LivePusherContext.clearFilters
            • LivePusherContext.clearMakeups
            • LivePusherContext.clearStickers
            • LivePusherContext.createOffscreenCanvas
            • LivePusherContext.exitPictureInPicture
            • LivePusherContext.getMaxZoom
            • LivePusherContext.onCustomRendererEvent
            • LivePusherContext.pause
            • LivePusherContext.pauseBGM
            • LivePusherContext.playBGM
            • LivePusherContext.resume
            • LivePusherContext.resumeBGM
            • LivePusherContext.sendMessage
            • LivePusherContext.setBGMVolume
            • LivePusherContext.setMICVolume
            • LivePusherContext.setZoom
            • LivePusherContext.snapshot
            • LivePusherContext.start
            • LivePusherContext.startPreview
            • LivePusherContext.stop
            • LivePusherContext.stopBGM
            • LivePusherContext.stopPreview
            • LivePusherContext.switchCamera
            • LivePusherContext.toggleTorch
          • wx.createLivePlayerContext
          • wx.createLivePusherContext
        • 背景音频
          • BackgroundAudioManager
            • BackgroundAudioManager.onCanplay
            • BackgroundAudioManager.onEnded
            • BackgroundAudioManager.onError
            • BackgroundAudioManager.onNext
            • BackgroundAudioManager.onPause
            • BackgroundAudioManager.onPlay
            • BackgroundAudioManager.onPrev
            • BackgroundAudioManager.onSeeked
            • BackgroundAudioManager.onSeeking
            • BackgroundAudioManager.onStop
            • BackgroundAudioManager.onTimeUpdate
            • BackgroundAudioManager.onWaiting
            • BackgroundAudioManager.pause
            • BackgroundAudioManager.play
            • BackgroundAudioManager.seek
            • BackgroundAudioManager.stop
          • wx.getBackgroundAudioManager
          • wx.getBackgroundAudioPlayerState
          • wx.onBackgroundAudioPause
          • wx.onBackgroundAudioPlay
          • wx.onBackgroundAudioStop
          • wx.pauseBackgroundAudio
          • wx.playBackgroundAudio
          • wx.seekBackgroundAudio
          • wx.stopBackgroundAudio
        • 视频
          • wx.checkDeviceSupportHevc
          • wx.chooseMedia
          • wx.chooseVideo
          • wx.compressVideo
          • wx.createVideoContext
          • wx.getVideoInfo
          • wx.openVideoEditor
          • wx.saveMediaToPhotosAlbum
          • 保存视频到系统相册
          • 视频上下文
            • VideoContext.exitCasting
            • VideoContext.exitPictureInPicture
            • VideoContext.hideStatusBar
            • VideoContext.pause
            • VideoContext.play
            • VideoContext.playbackRate
            • VideoContext.reconnectCasting
            • VideoContext.requestBackgroundPlayback
            • VideoContext.requestFullScreen
            • VideoContext.seek
            • VideoContext.sendDanmu
            • VideoContext.showStatusBar
            • VideoContext.stop
            • 视频上下文切换投屏
            • 视频上下文开始投屏
            • 视频退出全屏
            • 退出后台播放
        • 音频
          • AudioBuffer
            • AudioBuffer.copyFromChannel
            • AudioBuffer.copyToChannel
            • AudioBuffer.getChannelData
          • AudioContext
            • AudioContext.pause
            • AudioContext.play
            • AudioContext.seek
            • AudioContext.setSrc
          • AudioListener
          • AudioParam
          • BufferSourceNode
            • BufferSourceNode.connect
            • BufferSourceNode.disconnect
            • BufferSourceNode.start
            • BufferSourceNode.stop
          • InnerAudioContext
            • InnerAudioContext.destroy
            • InnerAudioContext.offCanplay
            • InnerAudioContext.offEnded
            • InnerAudioContext.offError
            • InnerAudioContext.offPause
            • InnerAudioContext.offPlay
            • InnerAudioContext.offSeeked
            • InnerAudioContext.offSeeking
            • InnerAudioContext.offStop
            • InnerAudioContext.offTimeUpdate
            • InnerAudioContext.offWaiting
            • InnerAudioContext.onCanplay
            • InnerAudioContext.onEnded
            • InnerAudioContext.onError
            • InnerAudioContext.onPause
            • InnerAudioContext.onPlay
            • InnerAudioContext.onSeeked
            • InnerAudioContext.onSeeking
            • InnerAudioContext.onStop
            • InnerAudioContext.onTimeUpdate
            • InnerAudioContext.onWaiting
            • InnerAudioContext.pause
            • InnerAudioContext.play
            • InnerAudioContext.seek
            • InnerAudioContext.stop
          • MediaAudioPlayer
            • MediaAudioPlayer.addAudioSource
            • MediaAudioPlayer.destroy
            • MediaAudioPlayer.removeAudioSource
            • MediaAudioPlayer.start
            • MediaAudioPlayer.stop
          • WebAudioContext
            • WebAudioContext.close
            • WebAudioContext.createAnalyser
            • WebAudioContext.createBiquadFilter
            • WebAudioContext.createBuffer
            • WebAudioContext.createBufferSource
            • WebAudioContext.createChannelMerger
            • WebAudioContext.createChannelSplitter
            • WebAudioContext.createConstantSource
            • WebAudioContext.createDelay
            • WebAudioContext.createDynamicsCompressor
            • WebAudioContext.createGain
            • WebAudioContext.createIIRFilter
            • WebAudioContext.createOscillator
            • WebAudioContext.createPanner
            • WebAudioContext.createPeriodicWave
            • WebAudioContext.createScriptProcessor
            • WebAudioContext.createWaveShaper
            • WebAudioContext.decodeAudioData
            • WebAudioContext.resume
            • WebAudioContext.suspend
          • WebAudioContextNode
          • wx.createAudioContext
          • wx.createInnerAudioContext
          • wx.createWebAudioContext
          • wx.getAvailableAudioSources
          • wx.pauseVoice
          • wx.playVoice
          • wx.setInnerAudioOption
          • wx.stopVoice
          • 创建媒体音频播放器
      • 支付
        • GlobalPayment
          • GlobalPayment.abort
          • GlobalPayment.openMethodPicker
          • GlobalPayment.requestGlobalPayment
        • wx.createGlobalPayment
        • wx.jumpToOfflinePay
        • wx.openHKOfflinePayView
        • wx.requestAppleSubscribeSign
        • wx.requestCommonPayment
        • wx.requestMerchantTransfer
        • wx.requestPayment
        • wx.requestPluginPayment
        • wx.requestVirtualPayment
        • wx.verifyHKPaymentPassword
      • 数据分析
        • wx.getCommonConfig
        • wx.getExptInfoSync
        • wx.reportAnalytics
        • wx.reportEvent
        • wx.reportMonitor
      • 数据缓存
        • wx.batchGetStorage
        • wx.batchGetStorageSync
        • wx.batchSetStorage
        • wx.batchSetStorageSync
        • wx.clearStorage
        • wx.clearStorageSync
        • wx.createBufferURL
        • wx.getStorage
        • wx.getStorageInfo
        • wx.getStorageInfoSync
        • wx.getStorageSync
        • wx.removeStorage
        • wx.removeStorageSync
        • wx.revokeBufferURL
        • wx.setStorage
        • wx.setStorageSync
        • 数据预拉取和周期性更新
          • wx.getBackgroundFetchData
          • wx.getBackgroundFetchToken
          • wx.onBackgroundFetchData
          • wx.setBackgroundFetchToken
        • 缓存管理器
          • CacheManager
            • CacheManager.addRule
            • CacheManager.addRules
            • CacheManager.clearCaches
            • CacheManager.clearRules
            • CacheManager.deleteCache
            • CacheManager.deleteCaches
            • CacheManager.deleteRule
            • CacheManager.deleteRules
            • CacheManager.match
            • CacheManager.off
            • CacheManager.on
            • CacheManager.start
            • CacheManager.stop
          • wx.createCacheManager
      • 画布
        • Canvas
          • Canvas.cancelAnimationFrame
          • Canvas.createImage
          • Canvas.createImageData
          • Canvas.createPath2D
          • Canvas.getContext
          • Canvas.requestAnimationFrame
          • Canvas.toDataURL
        • CanvasContext
          • CanvasContext.arc
          • CanvasContext.arcTo
          • CanvasContext.beginPath
          • CanvasContext.bezierCurveTo
          • CanvasContext.clearRect
          • CanvasContext.clip
          • CanvasContext.closePath
          • CanvasContext.createCircularGradient
          • CanvasContext.createLinearGradient
          • CanvasContext.createPattern
          • CanvasContext.draw
          • CanvasContext.drawImage
          • CanvasContext.fill
          • CanvasContext.fillRect
          • CanvasContext.fillText
          • CanvasContext.lineTo
          • CanvasContext.measureText
          • CanvasContext.moveTo
          • CanvasContext.quadraticCurveTo
          • CanvasContext.rect
          • CanvasContext.restore
          • CanvasContext.rotate
          • CanvasContext.save
          • CanvasContext.scale
          • CanvasContext.setFillStyle
          • CanvasContext.setFontSize
          • CanvasContext.setGlobalAlpha
          • CanvasContext.setLineCap
          • CanvasContext.setLineDash
          • CanvasContext.setLineJoin
          • CanvasContext.setLineWidth
          • CanvasContext.setMiterLimit
          • CanvasContext.setShadow
          • CanvasContext.setStrokeStyle
          • CanvasContext.setTextAlign
          • CanvasContext.setTextBaseline
          • CanvasContext.setTransform
          • CanvasContext.stroke
          • CanvasContext.strokeRect
          • CanvasContext.strokeText
          • CanvasContext.transform
          • CanvasContext.translate
        • CanvasGradient
          • CanvasGradient.addColorStop
        • Color
        • ImageData
        • OffscreenCanvas
          • OffscreenCanvas.createImage
          • OffscreenCanvas.getContext
        • Path2D
          • Path2D.addPath
          • Path2D.arc
          • Path2D.arcTo
          • Path2D.bezierCurveTo
          • Path2D.closePath
          • Path2D.ellipse
          • Path2D.lineTo
          • Path2D.moveTo
          • Path2D.quadraticCurveTo
          • Path2D.rect
        • RenderingContext
        • wx.canvasGetImageData
        • wx.canvasPutImageData
        • wx.canvasToTempFilePath
        • wx.createCanvasContext
        • wx.createOffscreenCanvas
        • 图片
      • 界面
        • Tab Bar
          • wx.hideTabBar
          • wx.hideTabBarRedDot
          • wx.removeTabBarBadge
          • wx.setTabBarBadge
          • wx.setTabBarItem
          • wx.showTabBar
          • wx.showTabBarRedDot
          • 微信小程序wx.setTabBarStyle
        • worklet 动画
          • wx.worklet
          • 动画
            • worklet.decay
            • worklet.Easing
            • worklet.spring
            • worklet.timing
          • 基础
            • worklet.cancelAnimation
            • worklet.derived
            • worklet.scrollViewContext
            • worklet.scrollViewContext.scrollTo
            • worklet.shared
          • 工具函数
            • worklet.runOnJS
            • worklet.runOnUI
          • 组合动画
            • worklet.delay
            • worklet.repeat
            • worklet.sequence
        • 下拉刷新
          • wx.startPullDownRefresh
          • wx.stopPullDownRefresh
        • 交互
          • wx.disableAlertBeforeUnload
          • wx.enableAlertBeforeUnload
          • wx.hideLoading
          • wx.hideToast
          • wx.showActionSheet
          • wx.showLoading
          • wx.showModal
          • wx.showToast
        • 动画
          • Animation
            • Animation.backgroundColor
            • Animation.bottom
            • Animation.export
            • Animation.height
            • Animation.left
            • Animation.matrix
            • Animation.matrix3d
            • Animation.opacity
            • Animation.right
            • Animation.rotate
            • Animation.rotate3d
            • Animation.rotateX
            • Animation.rotateY
            • Animation.rotateZ
            • Animation.scale
            • Animation.scale3d
            • Animation.scaleX
            • Animation.scaleY
            • Animation.scaleZ
            • Animation.skew
            • Animation.skewX
            • Animation.skewY
            • Animation.step
            • Animation.top
            • Animation.translate
            • Animation.translate3d
            • Animation.translateX
            • Animation.translateY
            • Animation.translateZ
            • Animation.width
          • wx.createAnimation
        • 字体
          • wx.loadBuiltInFontFace
          • wx.loadFontFace
        • 导航栏
          • wx.hideHomeButton
          • wx.hideNavigationBarLoading
          • wx.setNavigationBarColor
          • wx.setNavigationBarTitle
          • 微信小程序showNavigationBarLoading
        • 滚动
          • ScrollViewContext
            • ScrollViewContext.closeRefresh
            • ScrollViewContext.closeTwoLevel
            • ScrollViewContext.scrollIntoView
            • ScrollViewContext.scrollTo
            • ScrollViewContext.triggerRefresh
            • ScrollViewContext.triggerTwoLevel
          • wx.pageScrollTo
        • 窗口
          • wx.checkIsPictureInPictureActive
          • wx.offParallelStateChange
          • wx.offWindowResize
          • wx.offWindowStateChange
          • wx.onParallelStateChange
          • wx.onWindowResize
          • wx.onWindowStateChange
          • wx.setWindowSize
        • 置顶
          • wx.setTopBarText
        • 背景
          • wx.setBackgroundColor
          • wx.setBackgroundTextStyle
        • 自定义组件
          • wx.nextTick
        • 菜单
          • wx.getMenuButtonBoundingClientRect
          • wx.offMenuButtonBoundingClientRectWeightChange
          • wx.offUserOffTranslation
          • wx.offUserTriggerTranslation
          • wx.onMenuButtonBoundingClientRectWeightChange
          • wx.onUserOffTranslation
          • wx.onUserTriggerTranslation
      • 网络
        • mDNS
          • wx.offLocalServiceDiscoveryStop
          • wx.offLocalServiceFound
          • wx.offLocalServiceLost
          • wx.offLocalServiceResolveFail
          • wx.onLocalServiceDiscoveryStop
          • wx.onLocalServiceFound
          • wx.onLocalServiceLost
          • wx.onLocalServiceResolveFail
          • wx.startLocalServiceDiscovery
          • wx.stopLocalServiceDiscovery
        • TCP 通信
          • TCPSocket
            • TCPSocket.bindWifi
            • TCPSocket.close
            • TCPSocket.connect
            • TCPSocket.offBindWifi
            • TCPSocket.offClose
            • TCPSocket.offConnect
            • TCPSocket.offError
            • TCPSocket.offMessage
            • TCPSocket.onBindWifi
            • TCPSocket.onClose
            • TCPSocket.onConnect
            • TCPSocket.onError
            • TCPSocket.onMessage
            • TCPSocket.write
          • wx.createTCPSocket
        • UDP 通信
          • UDPSocket
            • UDPSocket.bind
            • UDPSocket.close
            • UDPSocket.connect
            • UDPSocket.offClose
            • UDPSocket.offError
            • UDPSocket.offListening
            • UDPSocket.offMessage
            • UDPSocket.onClose
            • UDPSocket.onError
            • UDPSocket.onListening
            • UDPSocket.onMessage
            • UDPSocket.send
            • UDPSocket.setTTL
            • UDPSocket.write
          • wx.createUDPSocket
        • WebSocket
          • SocketTask
            • SocketTask.close
            • SocketTask.onClose
            • SocketTask.onError
            • SocketTask.onMessage
            • SocketTask.onOpen
            • SocketTask.send
          • wx.closeSocket
          • wx.connectSocket
          • wx.onSocketClose
          • wx.onSocketError
          • wx.onSocketMessage
          • wx.onSocketOpen
          • wx.sendSocketMessage
        • 上传
          • UploadTask
            • UploadTask.abort
            • UploadTask.offHeadersReceived
            • UploadTask.offProgressUpdate
            • UploadTask.onHeadersReceived
            • UploadTask.onProgressUpdate
          • wx.uploadFile
        • 下载
          • DownloadTask
            • DownloadTask.abort
            • DownloadTask.offHeadersReceived
            • DownloadTask.offProgressUpdate
            • DownloadTask.onHeadersReceived
            • DownloadTask.onProgressUpdate
          • wx.downloadFile
        • 发起请求
          • RequestTask
            • RequestTask.abort
            • RequestTask.offChunkReceived
            • RequestTask.offHeadersReceived
            • RequestTask.onChunkReceived
            • RequestTask.onHeadersReceived
          • wx.request
      • 聊天工具
        • wx.enterChatToolMode
        • wx.getChatToolInfo
        • wx.openChatTool
        • wx.selectGroupMembers
        • wx.shareAppMessageToGroup
        • wx.shareEmojiToGroup
        • wx.shareFileToGroup
        • wx.shareImageToGroup
        • wx.shareVideoToGroup
        • 微信小程序wx.notifyGroupMembers
      • 路由
        • EventChannel
          • EventChannel.emit
          • EventChannel.off
          • EventChannel.on
          • EventChannel.once
        • wx.navigateBack
        • wx.navigateTo
        • wx.redirectTo
        • wx.reLaunch
        • wx.rewriteRoute
        • wx.switchTab
        • 自定义路由
          • wx.router
          • 基础
            • router.addRouteBuilder
            • router.removeRouteBuilder
            • 获取路由上下文
      • 跳转
        • wx.copyRealname
        • wx.exitMiniProgram
        • wx.navigateBackMiniProgram
        • wx.navigateToMiniProgram
        • wx.offEmbeddedMiniProgramHeightChange
        • wx.onEmbeddedMiniProgramHeightChange
        • wx.openEmbeddedMiniProgram
        • wx.openInquiriesTopic
        • wx.openOfficialAccountArticle
        • wx.openOfficialAccountChat
        • wx.openOfficialAccountProfile
        • wx.openPhotoTopicView
        • wx.requestAutomaticRepayment
        • wx.restartMiniProgram
      • 转发
        • wx.authPrivateMessage
        • wx.getShareInfo
        • wx.hideShareMenu
        • wx.offCopyUrl
        • wx.onCopyUrl
        • wx.shareFileMessage
        • wx.shareToOfficialAccount
        • wx.shareVideoMessage
        • wx.showShareImageMenu
        • wx.showShareMenu
        • wx.updateShareMenu
    • 平台能力
      • 行业能力
        • 微信小程序
    • 指南
      • glass-easel 组件框架
        • 介绍
        • 新增特性
          • Chaining API
          • Chaining API 的 init 函数
          • 介绍
          • 动态 slot
          • 在模板中调用 data 里的函数
        • 适配指引
      • PC 微信小程序
        • PC 微信小程序接入指南
      • Skyline 渲染引擎
        • AI
          • Skills
        • 从 WebView 迁移
          • 发布上线
          • 常见兼容问题
          • 新版组件框架适配指引
          • 最佳实践
          • 起步
          • 迁移工具
        • 动态
          • 更新日志
          • 特性状态
        • 增强特性
          • Worklet 动画
          • 全局工具栏
          • 共享元素动画
          • 动画曲线
          • 手势系统
          • 滚动容器及其应用场景
          • 自定义路由
            • 容器转场动画
            • 页面返回手势
            • 预设路由效果
        • 性能调试
        • 支持与差异
          • WXSS 样式
          • 基础组件
        • 概览
          • 介绍
          • 性能对比
          • 特性
          • 示例体验
      • 健康运营指引
        • 业务安全解决方案
        • 微信小程序内容安全解决方案
        • 微信小程序用户安全解决方案
        • 微信小程序用户隐私保护
          • 微信小程序用户隐私保护指引内容介绍
          • 微信小程序用户隐私保护指引填写说明
          • 微信小程序隐私协议开发指南
          • 插件用户隐私保护说明内容介绍
      • 国际化友好适配指南
      • 基础库
        • 介绍
        • 低版本兼容
        • 版本分布
      • 基础能力
        • AI/AR
          • AI推理能力Beta
            • 介绍
            • 模型量化推理
            • 算子支持列表
          • VisionKit 视觉能力
            • 6Dof-水平面 AR
            • 6Dof-水平面 AR 扩展能力
            • Marker AR
            • OCR检测
            • VisionKit 基础
            • 人体检测
            • 人手检测
            • 人脸检测
            • 单样本检测(OSD)
            • 深度估计
            • 身份证检测
            • 鞋部检测
        • DarkMode 适配指南
        • HarmonyOS 适配指南
        • 分包加载
          • 使用分包
          • 分包异步化
          • 分包预下载
          • 独立分包
        • 周期性更新
        • 多线程 Worker
        • 大屏适配指南
        • 存储
        • 按需注入和用时注入
        • 数据预拉取
        • 文件系统
        • 服务端能力
          • 服务端 API
          • 消息推送
        • 画布
          • 介绍
          • 旧版迁移指南
        • 网络
          • 业务域名
          • 使用说明
          • 局域网通信
          • 移动解析HttpDNS
        • 自定义 tabBar
      • 安全指引
        • 后台
          • 弱口令
          • 文件上传漏洞
          • 文件下载
          • 条件竞争
          • 注入漏洞
          • 目录遍历
        • 后台(包括云函数与自建后台)
          • SQL 注入
          • 命令注入
        • 开发原则与注意事项
        • 微信小程序
        • 通用
          • 代码管理与泄漏
          • 信息泄露
          • 微信小程序授权用户信息变更
          • 微信小程序违规处罚信息通知
          • 接口鉴权
      • 开放能力
        • 分享到朋友圈
        • 分享数据到微信运动
        • 安全能力
          • 安全键盘
          • 微信小程序加密网络通道
        • 广告
          • Banner 广告
          • 原生模板广告
          • 广告数据接口
            • 广告位清单
            • 广告汇总数据
            • 广告细分数据
            • 结算收入数据
          • 广告预加载接口
          • 插屏广告
          • 格子广告
          • 激励视频广告
          • 视频前贴广告
          • 视频广告
        • 微信小程序账号迁移
        • 微信小程序赞赏组件
        • 打开 App
        • 打开半屏微信小程序
        • 收藏
        • 数据分析
        • 消息
          • 位置消息
          • 客服消息
            • 下发客服输入状态
            • 临时素材
            • 发送消息
            • 接收消息和事件
            • 概述
            • 转发消息
          • 订阅消息
            • 微信小程序订阅消息(用户通过弹窗订阅)开发指南
              • 订阅消息添加提醒
              • 订阅消息语音提醒
            • 新版一次性订阅消息开发指南
        • 用工关系
        • 用户信息
          • UnionID 机制说明
          • 开放数据校验与解密
          • 微信小程序登录
          • 手机号实时验证组件
          • 手机号快速验证组件
          • 授权
          • 生物认证
          • 获取头像昵称
        • 聊天工具
        • 聊天工具开放模式
        • 聊天素材打开
        • 获取微信小程序码
        • 获取微信小程序链接
          • 应用:NFC 标签打开微信小程序
          • 应用:短信打开微信小程序
          • 获取 Short Link
          • 获取 URL Link
          • 获取 URL Scheme
        • 视频号
          • 视频号主页
          • 视频号活动
          • 视频号直播
          • 视频号视频
        • 账户卡片
        • 转发
          • 动态消息
          • 微信小程序私密消息
          • 转发
        • 音视频通话
          • 双人音视频对话
          • 多人音视频对话
      • 微信小程序 XR-FRAME
        • 开发指南
          • 2DMarker+视频,让照片动起来
          • OSDMarker,给现实物体做标记
          • 之后的,就交给你的创意
          • 再来点交互
          • 分享给你的好友吧!
          • 动起来,加入动画
          • 后处理,让画面更加好玩
          • 在页面中使用这个组件
          • 开始
          • 微信小程序:加上魔法,来点粒子
          • 微信小程序颜色和灯光
          • 手势,给喜欢的作品点赞
          • 新建一个XR组件
          • 有点寡淡,加上图像
          • 添加一个物体
          • 组件通信,加上HUD
          • 虚拟 x 现实,追加 AR 能力
          • 让场景更丰富,环境数据
          • 识别人脸,给自己戴个面具
          • 还是不够,放个模型
      • 微信小程序基础库
        • v0.x版本
        • v1.x版本
        • v2.x版本
        • v3.x版本
      • 微信小程序搜索
        • 商品数据接入(内测)
        • 微信小程序搜索优化指南
      • 微信小程序框架
        • 介绍
        • 场景值
        • 视图层
          • WXML
          • WXS
          • WXSS
          • 事件系统
            • Pointer 事件
            • Tap 事件
            • WXS 响应事件
            • 介绍
          • 介绍
          • 分栏模式
          • 初始渲染缓存
          • 动画
          • 响应显示区域变化
          • 基础组件
          • 简易双向绑定
          • 获取界面上的节点信息
        • 逻辑层
          • API
          • 介绍
          • 模块化
          • 注册微信小程序
          • 注册页面
          • 页面生命周期
          • 页面路由
            • 介绍
            • 路由事件重写
            • 页面路由监听
      • 微信小程序运行时
        • JavaScript 支持情况
        • 更新机制
        • 运行机制
        • 运行环境
      • 性能与体验
        • WXWebAssembly
        • 体验分析
        • 体验评分
          • 体验评分简介
          • 评分方法与规则
            • 体验
            • 性能
            • 最佳实践
            • 评分方法
        • 启动性能
          • 代码包体积优化
          • 代码注入优化
          • 其他优化建议
          • 微信小程序启动流程
          • 概述
          • 首屏渲染优化
        • 弱网体验优化
        • 微信小程序接口调用频率规范
        • 性能数据
        • 性能诊断工具
          • 工具介绍
          • 工具评测标准
        • 概述
        • 网络调优
        • 调试工具
          • FPS 面板
          • 代码质量分析面板
          • 性能面板
          • 概述
          • 模拟器和调试器
          • 真机调试 2.0
        • 运行时性能
          • 内存优化
          • 合理使用 setData
          • 概述
          • 渲染性能优化
          • 资源加载优化
          • 页面切换优化
      • 插件
        • 介绍
        • 使用插件
        • 开发插件
        • 插件使用组件的限制
        • 插件功能页
          • 介绍
          • 发票功能页
          • 发票抬头功能页
          • 微信小程序支付功能页
          • 收货地址功能页
          • 用户信息功能页
        • 插件调用 API 的限制
      • 界面渲染
        • 界面渲染架构
        • 页面间关系
          • 页面间关系与通信
      • 目录结构
      • 组件框架
        • behaviors
        • 事件系统
          • 事件对象
          • 事件绑定
          • 触发与监听事件
        • 引用组件
        • 数据控制
          • 数据字段拷贝控制
          • 数据控制概述
          • 数据更新策略
          • 数据监听器
          • 纯数据字段
          • 组件初始化策略
          • 获取更新性能统计信息
          • 高级数据更新方法
        • 样式控制
          • 引用外部样式
          • 组件样式
          • 虚拟组件节点
        • 组件化
        • 组件属性
        • 组件生命周期
        • 组件脚本
        • 组件间交互
          • slot 模式
          • trait behaviors
          • 组件树访问
          • 组件间交互概述
      • 自定义组件
        • behaviors
        • Component 构造器
        • 介绍
        • 单元测试
        • 占位组件
        • 开发第三方自定义组件
        • 抽象节点
        • 数据监听器
        • 查看自定义组件数据
        • 纯数据字段
        • 组件模板和样式
        • 组件生命周期
        • 组件系统
        • 组件间关系
        • 组件间通信与事件
        • 自定义组件扩展
        • 获取更新性能统计信息
      • 调试
        • Errno错误码
        • vConsole
        • 实时日志
        • 微信小程序 Source Map
        • 概述
      • 起步
        • 开始
          • 你的第一个微信小程序
          • 安装开发者工具
          • 申请账号
          • 编译预览
        • 微信小程序代码构成
          • JS 逻辑交互
          • JSON 配置
            • JSON 语法
          • WXML 模板
          • WXSS 样式
          • 程序
        • 微信小程序协同工作和发布
          • 协同工作
            • 微信小程序成员管理
          • 发布上线
            • 上传代码
            • 发布
            • 微信小程序码
            • 提交审核
            • 预览
          • 微信小程序的版本
          • 运营数据
        • 微信小程序宿主环境
          • API
          • 渲染层和逻辑层
          • 程序与页面
          • 组件
        • 微信小程序简介
          • 体验微信小程序
          • 微信小程序与普通网页开发的区别
          • 微信小程序技术发展史
      • 连接硬件能力
        • 下载
          • 安卓微信小程序硬件框架
        • 无线局域网 (Wi-Fi)
        • 硬件设备接入
        • 穿戴设备微信小程序框架
        • 蓝牙
          • 介绍
          • 蓝牙低功耗 (BLE)
          • 蓝牙低功耗网状网络 (BLE Mesh)
          • 蓝牙信标 (Beacon)
        • 设备消息
        • 设备组
        • 设备认证
          • 使用 WMPF(安卓)认证设备
          • 指引
          • 设备认证 SDK(安卓)
          • 设备认证 TEE 规范
        • 近场通信 (NFC)
        • 需要帮助
        • 音视频通话+摄像头(for 硬件)
          • VoIP 通话插件
            • 微信小程序支付刷脸模式
            • 接入指引
            • 接口文档
              • forceHangUpVoip
              • getIotBindContactList
              • getPluginOnloadOptions
              • setCustomBtnText
              • setUIConfig
              • setVoipEndPagePath
              • 发起通话
                • callDevice
                • callWMPF
                • initByCaller
                • 介绍
              • 微信小程序 onVoipEvent
              • 获取插件入口参数
              • 错误码
            • 更新日志
          • 介绍
          • 开发安卓设备端应用
          • 微信小程序摄像头插件
            • 接入指引
          • 微信小程序用户授权设备
          • 微信小程序音视频通话 SDK
            • Linux 设备
            • RTOS 设备
              • 云对云服务端
              • 云对云设备端
            • VoIP 视频流指南
            • 异步接口使用指南
            • 硬件抽象层
          • 性能与体验优化
          • 手机微信呼叫设备(Linux)
          • 手机微信呼叫设备(安卓)
          • 设备呼叫手机微信
          • 问题排查
            • 常见问题 FAQ
            • 通话异常排查指南
            • 通话提醒异常排查指南
      • 配置微信小程序
        • 全局配置
        • 页面配置
    • 框架
      • WXML 语法参考
        • 临时变量
        • 介绍
        • 列表渲染
        • 属性绑定前缀
        • 引用
        • 数据绑定
        • 数据绑定表达式
        • 条件渲染
        • 框架属性
        • 框架标签
        • 模板
      • WXS 语法参考
        • 介绍
        • 变量
        • 基础类库
        • 数据类型
        • 模块
        • 注释
        • 语句
        • 运算符
      • 场景值
      • 微信小程序配置
        • 全局配置
        • 页面配置
      • 框架接口
        • 基础功能
          • console
            • console.debug
            • console.error
            • console.group
            • console.info
            • console.log
            • console.warn
            • 微信小程序console.groupEnd
          • WXWebAssembly
          • 定时器
            • clearInterval
            • clearTimeout
            • setInterval
            • setTimeout
        • 微信小程序 App
          • App
          • getApp
        • 模块化
          • exports
          • module
          • require
          • requirePlugin
          • 微信小程序 requireMiniProgram
        • 自定义组件
          • Behavior
          • Component
        • 页面
          • getCurrentPages
          • Page
          • Router
    • 组件
      • Skyline
        • grid-builder
        • grid-view
        • List Builder
        • list-view
        • nested-scroll-body
        • nested-scroll-header
        • open-container
        • open-data-item
        • open-data-list
        • share-element
        • snapshot
        • span
        • sticky-header
        • sticky-section
        • 微信小程序 draggable-sheet
        • 手势系统
          • double-tap-gesture-handler
          • force-press-gesture-handler
          • long-press-gesture-handler
          • pan-gesture-handler
          • tap-gesture-handler
          • 微信小程序scale-gesture-handler
          • 微信小程序垂直拖动手势处理
          • 微信小程序水平拖动手势处理
      • XR-FRAME
        • AR
          • AR系统(ARSystem)
            • AR场景事件
            • AR相机(ARCamera)
            • 不同AR追踪器的坐标系差异
            • 深度遮挡(DepthMask)Beta
            • 识别模式
          • AR追踪器(ARTracker)
            • 2D Marker(Marker)
            • 3D Marker(Marker)
            • 3自由度(threeDof)
            • OSD Marker(OSD)
            • 人手识别(Hand)
            • 人脸识别(Face)
            • 平面识别(Plane)
            • 平面识别结合Marker(Plane)
            • 获取追踪状态(TrackState)
            • 躯体识别(Body)
        • GLTF
          • GLTF入门
          • 画廊
        • 交互和物理
          • 刚体(Rigidbody)Beta
          • 物理系统(PhysicSystem)
          • 轮廓(Shape)
          • 轮廓交互(interact)Beta
        • 内置资源
          • Simple效果
          • Standard效果
          • 内置几何数据
          • 内置后处理
          • 内置图集
          • 内置效果资源
          • 内置环境数据
          • 内置纹理资源
        • 分享
          • 录制画布(Record)
          • 截取画布(Capture)
        • 动画
          • 动画实现(Animation)
          • 动画组件(Animator)
          • 帧动画(KeyframeAnimation)
        • 工具
          • 环境数据生成
          • 真机调试
        • 核心
          • Shadow元素(ShadowElement)
          • Slot
          • 事件(Event)
          • 元素
          • 可见性与图层(Visible&Layer)
          • 场景(Scene)
          • 架构(ECS)
          • 组件(Component)
          • 组件数据解析(DataParse)
        • 概述
          • 概述
          • 特性
          • 示例
          • 限制和展望
        • 渲染
          • 几何数据(Geometry)
          • 后处理(PostProcess)Beta
          • 图集(Atlas)
          • 天空盒与背景(Skybox)
          • 效果(Effect)
          • 材质
          • 渲染到纹理(RenderTexture)
          • 画布透明配置(Alpha)
          • 相机(Camera)
          • 立方体纹理(CubeTexture)
          • 纹理使用约定
          • 网格(Mesh)
          • 视频纹理(VideoTexture)Beta
          • 阴影(Shadow)
        • 粒子
          • 其他属性和动画
          • 发射器(Emitter)
          • 粒子系统(Particles)
        • 资源
          • 资源加载元素(AssetLoad)
          • 资源加载器(AssetLoader)
          • 资源系统(AssetsSystem)
      • 原生组件说明
        • native-component
      • 地图
        • map
      • 基础内容
        • icon
        • progress
        • rich-text
        • selection
        • text
      • 媒体组件
        • audio
        • camera
        • channel-live
        • channel-video
        • image
        • live-player
        • live-pusher
        • video
        • voip-room
      • 导航
        • functional-page-navigator
        • navigator
      • 导航栏
        • navigation-bar
      • 开放能力
        • ad
        • ad-custom
        • open-data
        • store-coupon
        • store-home
        • store-product
        • web-view
        • 微信小程序 official-account
        • 微信小程序 store-gift
        • 微信小程序reward
        • 微信小程序官方账号发布
      • 无障碍访问
        • aria-component
      • 画布
        • canvas
      • 表单组件
        • button
        • checkbox
        • checkbox-group
        • editor-portal
        • form
        • label
        • picker
        • picker-view
        • picker-view-column
        • radio
        • radio-group
        • slider
        • switch
        • textarea
        • 微信小程序
        • 微信小程序编辑器
        • 键盘辅助
      • 视图容器
        • cover-image
        • cover-view
        • match-media
        • movable-area
        • movable-view
        • page-container
        • root-portal
        • scroll-view
        • swiper
        • swiper-item
        • view
      • 页面属性配置节点
        • page-meta

分类: MediaAudioPlayer.addAudioSource

Promise MediaAudioPlayer.addAudioSource(VideoDecodersource)

微信小程序插件:支持

功能描述

添加音频源

参数

VideoDecoder source

视频解码器实例。作为音频源添加到音频播放器中

返回值

Promise

添加音频源完成的 Promise

发布于 2026年10月13日分类 MediaAudioPlayer.addAudioSource
微信小程序开发指南
ICP备案号:滇ICP备2026001374号
滇公网安备53011202001710号