@@ -8825,12 +8825,6 @@ NFCAdapter.offDiscovered(listener) // 需传入与监听时同一个的函数对
88258825 /** 当前是否处于弱网状态 */
88268826 weakNet: boolean
88278827 }
8828- interface OnOnUserTriggerTranslationListenerResult {
8829- /** 翻译到的目标语言 */
8830- locale: string
8831- /** 触发来源, `button` 表示点击了菜单中的翻译按钮, `capsule` 表示点击了胶囊中的翻译提示 */
8832- type: string
8833- }
88348828 interface OnOpenListenerResult {
88358829 /** 需要基础库: `2.0.0`
88368830 *
@@ -8903,6 +8897,12 @@ NFCAdapter.offDiscovered(listener) // 需传入与监听时同一个的函数对
89038897 * 支持开发者自定义一键打开小程序时的 query */
89048898 query?: string
89058899 }
8900+ interface OnUserTriggerTranslationListenerResult {
8901+ /** 翻译到的目标语言 */
8902+ locale: string
8903+ /** 触发来源, `button` 表示点击了菜单中的翻译按钮, `capsule` 表示点击了胶囊中的翻译提示 */
8904+ type: string
8905+ }
89068906 interface OnVoIPChatInterruptedListenerResult {
89078907 /** 错误码 */
89088908 errCode: number
@@ -9269,12 +9269,6 @@ NFCAdapter.offDiscovered(listener) // 需传入与监听时同一个的函数对
92699269 /** 交易金额对象 */
92709270 amount: AmountOption
92719271 }
9272- interface OpenOfficialAccountArticleFailCallbackErr {
9273- /** 错误码 */
9274- errCode: number
9275- /** 错误信息 */
9276- errMsg: string
9277- }
92789272 interface OpenOfficialAccountArticleOption {
92799273 /** 需要打开的公众号地址 */
92809274 url: string
@@ -10904,6 +10898,12 @@ NFCAdapter.offDiscovered(listener) // 需传入与监听时同一个的函数对
1090410898 /** 开发者服务器返回的 HTTP 状态码 (目前开发者工具上不会返回 statusCode 字段,可用真机查看该字段,后续将会支持) */
1090510899 statusCode: number
1090610900 }
10901+ interface RequestVirtualPaymentFailCallbackErr {
10902+ /** 错误码 */
10903+ errCode: number
10904+ /** 错误信息 */
10905+ errMsg: string
10906+ }
1090710907 interface RequestVirtualPaymentOption {
1090810908 /** 支付的类型, 不同的支付类型有各自额外要传的附加参数
1090910909 *
@@ -26974,26 +26974,6 @@ wx.offNetworkWeakChange(listener) // 需传入与监听时同一个的函数对
2697426974 /** onNetworkWeakChange 传入的监听函数。不传此参数则移除所有监听函数。 */
2697526975 listener?: OffNetworkWeakChangeCallback
2697626976 ): void
26977- /** [wx.offOnUserTriggerTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.offOnUserTriggerTranslation.html)
26978- *
26979- * 需要基础库: `3.7.9`
26980- *
26981- * 在插件中使用:不支持
26982- *
26983- * 移除用户触发小程序菜单中翻译功能的事件的监听函数
26984- *
26985- * **示例代码**
26986- *
26987- * ```js
26988- const listener = function (res) { console.log(res) }
26989-
26990- wx.onOnUserTriggerTranslation(listener)
26991- wx.offOnUserTriggerTranslation(listener) // 需传入与监听时同一个的函数对象
26992- ``` */
26993- offOnUserTriggerTranslation(
26994- /** onOnUserTriggerTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
26995- listener?: OffOnUserTriggerTranslationCallback
26996- ): void
2699726977 /** [wx.offPageNotFound(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.offPageNotFound.html)
2699826978*
2699926979* 需要基础库: `2.1.2`
@@ -27104,6 +27084,46 @@ wx.offUnhandledRejection(listener) // 需传入与监听时同一个的函数对
2710427084 *
2710527085 * 用户主动截屏事件。取消事件监听。 */
2710627086 offUserCaptureScreen(): void
27087+ /** [wx.offUserOffTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.offUserOffTranslation.html)
27088+ *
27089+ * 需要基础库: `3.14.2`
27090+ *
27091+ * 在插件中使用:不支持
27092+ *
27093+ * 移除用户主动取消翻译的事件的监听函数
27094+ *
27095+ * **示例代码**
27096+ *
27097+ * ```js
27098+ const listener = function (res) { console.log(res) }
27099+
27100+ wx.onUserOffTranslation(listener)
27101+ wx.offUserOffTranslation(listener) // 需传入与监听时同一个的函数对象
27102+ ``` */
27103+ offUserOffTranslation(
27104+ /** onUserOffTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
27105+ listener?: OffUserOffTranslationCallback
27106+ ): void
27107+ /** [wx.offUserTriggerTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.offUserTriggerTranslation.html)
27108+ *
27109+ * 需要基础库: `3.7.9`
27110+ *
27111+ * 在插件中使用:不支持
27112+ *
27113+ * 移除用户触发小程序菜单中翻译功能的事件的监听函数
27114+ *
27115+ * **示例代码**
27116+ *
27117+ * ```js
27118+ const listener = function (res) { console.log(res) }
27119+
27120+ wx.onUserTriggerTranslation(listener)
27121+ wx.offUserTriggerTranslation(listener) // 需传入与监听时同一个的函数对象
27122+ ``` */
27123+ offUserTriggerTranslation(
27124+ /** onUserTriggerTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
27125+ listener?: OffUserTriggerTranslationCallback
27126+ ): void
2710727127 /** [wx.offVoIPChatInterrupted(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.offVoIPChatInterrupted.html)
2710827128*
2710927129* 需要基础库: `2.9.0`
@@ -28376,27 +28396,6 @@ wx.offNetworkWeakChange()
2837628396 /** 弱网状态变化事件的监听函数 */
2837728397 listener: OnNetworkWeakChangeCallback
2837828398 ): void
28379- /** [wx.onOnUserTriggerTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.onOnUserTriggerTranslation.html)
28380- *
28381- * 需要基础库: `3.7.9`
28382- *
28383- * 在插件中使用:不支持
28384- *
28385- * 监听用户触发小程序菜单中翻译功能的事件
28386- *
28387- * **示例代码**
28388- *
28389- * ```js
28390- const callback = res => console.log('userTriggerTranslation', res)
28391-
28392- wx.onUserTriggerTranslation(callback)
28393- // 取消监听
28394- wx.offUserTriggerTranslation(callback)
28395- ``` */
28396- onOnUserTriggerTranslation(
28397- /** 用户触发小程序菜单中翻译功能的事件的监听函数 */
28398- listener: OnOnUserTriggerTranslationCallback
28399- ): void
2840028399 /** [wx.onPageNotFound(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/base/app/app-event/wx.onPageNotFound.html)
2840128400 *
2840228401 * 需要基础库: `2.1.2`
@@ -28540,6 +28539,48 @@ wx.onUserCaptureScreen(function (res) {
2854028539 /** 用户主动截屏事件的监听函数 */
2854128540 listener: OnUserCaptureScreenCallback
2854228541 ): void
28542+ /** [wx.onUserOffTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.onUserOffTranslation.html)
28543+ *
28544+ * 需要基础库: `3.14.2`
28545+ *
28546+ * 在插件中使用:不支持
28547+ *
28548+ * 监听用户主动取消翻译的事件
28549+ *
28550+ * **示例代码**
28551+ *
28552+ * ```js
28553+ const callback = () => console.log('userTriggerTranslation')
28554+
28555+ wx.onUserOffTranslation(callback)
28556+ // 取消监听
28557+ wx.offUserOffTranslation(callback)
28558+ ``` */
28559+ onUserOffTranslation(
28560+ /** 用户主动取消翻译的事件的监听函数 */
28561+ listener: OnUserOffTranslationCallback
28562+ ): void
28563+ /** [wx.onUserTriggerTranslation(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/ui/menu/wx.onUserTriggerTranslation.html)
28564+ *
28565+ * 需要基础库: `3.7.9`
28566+ *
28567+ * 在插件中使用:不支持
28568+ *
28569+ * 监听用户触发小程序菜单中翻译功能的事件
28570+ *
28571+ * **示例代码**
28572+ *
28573+ * ```js
28574+ const callback = res => console.log('userTriggerTranslation', res)
28575+
28576+ wx.onUserTriggerTranslation(callback)
28577+ // 取消监听
28578+ wx.offUserTriggerTranslation(callback)
28579+ ``` */
28580+ onUserTriggerTranslation(
28581+ /** 用户触发小程序菜单中翻译功能的事件的监听函数 */
28582+ listener: OnUserTriggerTranslationCallback
28583+ ): void
2854328584 /** [wx.onVoIPChatInterrupted(function listener)](https://developers.weixin.qq.com/miniprogram/dev/api/media/voip/wx.onVoIPChatInterrupted.html)
2854428585 *
2854528586 * 需要基础库: `2.7.0`
@@ -33798,10 +33839,6 @@ wx.writeBLECharacteristicValue({
3379833839 type OffNetworkWeakChangeCallback = (
3379933840 result: OnNetworkWeakChangeListenerResult
3380033841 ) => void
33801- /** onOnUserTriggerTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
33802- type OffOnUserTriggerTranslationCallback = (
33803- result: OnOnUserTriggerTranslationListenerResult
33804- ) => void
3380533842 /** onPageNotFound 传入的监听函数。不传此参数则移除所有监听函数。 */
3380633843 type OffPageNotFoundCallback = (
3380733844 result: OnPageNotFoundListenerResult
@@ -33832,6 +33869,12 @@ wx.writeBLECharacteristicValue({
3383233869 type OffUnhandledRejectionCallback = (
3383333870 result: OnUnhandledRejectionListenerResult
3383433871 ) => void
33872+ /** onUserOffTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
33873+ type OffUserOffTranslationCallback = (res: GeneralCallbackResult) => void
33874+ /** onUserTriggerTranslation 传入的监听函数。不传此参数则移除所有监听函数。 */
33875+ type OffUserTriggerTranslationCallback = (
33876+ result: OnUserTriggerTranslationListenerResult
33877+ ) => void
3383533878 /** onVoIPChatInterrupted 传入的监听函数。不传此参数则移除所有监听函数。 */
3383633879 type OffVoIPChatInterruptedCallback = (
3383733880 result: OnVoIPChatInterruptedListenerResult
@@ -34087,10 +34130,6 @@ wx.writeBLECharacteristicValue({
3408734130 ) => void
3408834131 /** 用户在系统音乐播放面板点击下一曲事件的监听函数 */
3408934132 type OnNextCallback = (res: GeneralCallbackResult) => void
34090- /** 用户触发小程序菜单中翻译功能的事件的监听函数 */
34091- type OnOnUserTriggerTranslationCallback = (
34092- result: OnOnUserTriggerTranslationListenerResult
34093- ) => void
3409434133 /** WebSocket 连接打开事件的监听函数 */
3409534134 type OnOpenCallback = (result: OnOpenListenerResult) => void
3409634135 /** 小程序要打开的页面不存在事件的监听函数 */
@@ -34142,6 +34181,12 @@ wx.writeBLECharacteristicValue({
3414234181 type OnUserCaptureScreenCallback = (
3414334182 result: OnUserCaptureScreenListenerResult
3414434183 ) => void
34184+ /** 用户主动取消翻译的事件的监听函数 */
34185+ type OnUserOffTranslationCallback = (res: GeneralCallbackResult) => void
34186+ /** 用户触发小程序菜单中翻译功能的事件的监听函数 */
34187+ type OnUserTriggerTranslationCallback = (
34188+ result: OnUserTriggerTranslationListenerResult
34189+ ) => void
3414534190 /** 被动断开实时语音通话事件的监听函数 */
3414634191 type OnVoIPChatInterruptedCallback = (
3414734192 result: OnVoIPChatInterruptedListenerResult
@@ -34330,7 +34375,7 @@ wx.writeBLECharacteristicValue({
3433034375 ) => void
3433134376 /** 接口调用失败的回调函数 */
3433234377 type OpenOfficialAccountArticleFailCallback = (
34333- err: OpenOfficialAccountArticleFailCallbackErr
34378+ err: RequestVirtualPaymentFailCallbackErr
3433434379 ) => void
3433534380 /** 接口调用成功的回调函数 */
3433634381 type OpenOfficialAccountArticleSuccessCallback = (
@@ -34863,7 +34908,7 @@ wx.writeBLECharacteristicValue({
3486334908 ) => void
3486434909 /** 接口调用失败的回调函数 */
3486534910 type RequestVirtualPaymentFailCallback = (
34866- err: OpenOfficialAccountArticleFailCallbackErr
34911+ err: RequestVirtualPaymentFailCallbackErr
3486734912 ) => void
3486834913 /** 接口调用成功的回调函数 */
3486934914 type RequestVirtualPaymentSuccessCallback = (
0 commit comments