@spcsn/taro 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/dist/index.js +147 -0
- package/dist/index.js.map +1 -0
- package/index.js +9 -0
- package/package.json +86 -0
- package/types/api/ad/index.d.ts +197 -0
- package/types/api/ai/face.d.ts +133 -0
- package/types/api/ai/inference.d.ts +129 -0
- package/types/api/ai/visionkit.d.ts +874 -0
- package/types/api/alipay/index.d.ts +69 -0
- package/types/api/base/crypto.d.ts +104 -0
- package/types/api/base/debug.d.ts +329 -0
- package/types/api/base/env.d.ts +19 -0
- package/types/api/base/index.d.ts +102 -0
- package/types/api/base/performance.d.ts +258 -0
- package/types/api/base/system.d.ts +742 -0
- package/types/api/base/update.d.ts +130 -0
- package/types/api/base/weapp/app-event.d.ts +265 -0
- package/types/api/base/weapp/life-cycle.d.ts +155 -0
- package/types/api/canvas/index.d.ts +2162 -0
- package/types/api/cloud/index.d.ts +2622 -0
- package/types/api/data-analysis/index.d.ts +122 -0
- package/types/api/device/accelerometer.d.ts +102 -0
- package/types/api/device/accessibility.d.ts +26 -0
- package/types/api/device/battery.d.ts +46 -0
- package/types/api/device/bluetooth-ble.d.ts +601 -0
- package/types/api/device/bluetooth-peripheral.d.ts +430 -0
- package/types/api/device/bluetooth.d.ts +463 -0
- package/types/api/device/calendar.d.ts +98 -0
- package/types/api/device/clipboard.d.ts +81 -0
- package/types/api/device/compass.d.ts +105 -0
- package/types/api/device/contact.d.ts +110 -0
- package/types/api/device/gyroscope.d.ts +85 -0
- package/types/api/device/iBeacon.d.ts +168 -0
- package/types/api/device/keyboard.d.ts +97 -0
- package/types/api/device/memory.d.ts +52 -0
- package/types/api/device/motion.d.ts +88 -0
- package/types/api/device/network.d.ts +172 -0
- package/types/api/device/nfc.d.ts +1238 -0
- package/types/api/device/phone.d.ts +30 -0
- package/types/api/device/scan.d.ts +111 -0
- package/types/api/device/screen.d.ts +217 -0
- package/types/api/device/sms.d.ts +26 -0
- package/types/api/device/vibrate.d.ts +51 -0
- package/types/api/device/wifi.d.ts +301 -0
- package/types/api/ext/index.d.ts +64 -0
- package/types/api/files/index.d.ts +1472 -0
- package/types/api/framework/index.d.ts +51 -0
- package/types/api/location/index.d.ts +517 -0
- package/types/api/media/audio.d.ts +1013 -0
- package/types/api/media/background-audio.d.ts +291 -0
- package/types/api/media/camera.d.ts +207 -0
- package/types/api/media/editor.d.ts +239 -0
- package/types/api/media/image.d.ts +469 -0
- package/types/api/media/live.d.ts +461 -0
- package/types/api/media/map.d.ts +638 -0
- package/types/api/media/media-recorder.d.ts +117 -0
- package/types/api/media/recorder.d.ts +317 -0
- package/types/api/media/video-decoder.d.ts +117 -0
- package/types/api/media/video-processing.d.ts +84 -0
- package/types/api/media/video.d.ts +527 -0
- package/types/api/media/voip.d.ts +393 -0
- package/types/api/navigate/index.d.ts +327 -0
- package/types/api/network/download.d.ts +173 -0
- package/types/api/network/mdns.d.ts +191 -0
- package/types/api/network/request.d.ts +480 -0
- package/types/api/network/tcp.d.ts +181 -0
- package/types/api/network/udp.d.ts +218 -0
- package/types/api/network/upload.d.ts +201 -0
- package/types/api/network/websocket.d.ts +383 -0
- package/types/api/open-api/account.d.ts +51 -0
- package/types/api/open-api/address.d.ts +68 -0
- package/types/api/open-api/authorize.d.ts +80 -0
- package/types/api/open-api/card.d.ts +110 -0
- package/types/api/open-api/channels.d.ts +225 -0
- package/types/api/open-api/customer-service.d.ts +45 -0
- package/types/api/open-api/device-voip.d.ts +103 -0
- package/types/api/open-api/facial.d.ts +98 -0
- package/types/api/open-api/favorites.d.ts +101 -0
- package/types/api/open-api/group.d.ts +59 -0
- package/types/api/open-api/invoice.d.ts +87 -0
- package/types/api/open-api/license-plate.d.ts +27 -0
- package/types/api/open-api/login.d.ts +115 -0
- package/types/api/open-api/my-miniprogram.d.ts +28 -0
- package/types/api/open-api/privacy.d.ts +107 -0
- package/types/api/open-api/redpackage.d.ts +24 -0
- package/types/api/open-api/settings.d.ts +174 -0
- package/types/api/open-api/soter.d.ts +184 -0
- package/types/api/open-api/sticker.d.ts +83 -0
- package/types/api/open-api/subscribe-message.d.ts +305 -0
- package/types/api/open-api/user-info.d.ts +182 -0
- package/types/api/open-api/werun.d.ts +101 -0
- package/types/api/payment/index.d.ts +119 -0
- package/types/api/qq/index.d.ts +354 -0
- package/types/api/route/index.d.ts +324 -0
- package/types/api/share/index.d.ts +354 -0
- package/types/api/skyline/index.d.ts +345 -0
- package/types/api/storage/background-fetch.d.ts +131 -0
- package/types/api/storage/cache-manager.d.ts +249 -0
- package/types/api/storage/index.d.ts +405 -0
- package/types/api/swan/bookshelf.d.ts +307 -0
- package/types/api/swan/download-package.d.ts +80 -0
- package/types/api/swan/index.d.ts +251 -0
- package/types/api/swan/pay.d.ts +139 -0
- package/types/api/taro.extend.d.ts +233 -0
- package/types/api/taro.hooks.d.ts +148 -0
- package/types/api/ui/animation.d.ts +427 -0
- package/types/api/ui/background.d.ts +69 -0
- package/types/api/ui/custom-component.d.ts +23 -0
- package/types/api/ui/fonts.d.ts +77 -0
- package/types/api/ui/interaction.d.ts +281 -0
- package/types/api/ui/menu.d.ts +29 -0
- package/types/api/ui/navigation-bar.d.ts +130 -0
- package/types/api/ui/pull-down-refresh.d.ts +50 -0
- package/types/api/ui/scroll.d.ts +114 -0
- package/types/api/ui/sticky.d.ts +32 -0
- package/types/api/ui/tab-bar.d.ts +196 -0
- package/types/api/ui/window.d.ts +71 -0
- package/types/api/worker/index.d.ts +83 -0
- package/types/api/wxml/index.d.ts +540 -0
- package/types/compile/compiler.d.ts +32 -0
- package/types/compile/config/h5.d.ts +134 -0
- package/types/compile/config/harmony.d.ts +118 -0
- package/types/compile/config/index.d.ts +8 -0
- package/types/compile/config/manifest.d.ts +155 -0
- package/types/compile/config/mini.d.ts +118 -0
- package/types/compile/config/plugin.d.ts +34 -0
- package/types/compile/config/project.d.ts +338 -0
- package/types/compile/config/rn.d.ts +85 -0
- package/types/compile/config/util.d.ts +179 -0
- package/types/compile/hooks.d.ts +13 -0
- package/types/compile/index.d.ts +11 -0
- package/types/compile/viteCompilerContext.d.ts +167 -0
- package/types/global.d.ts +428 -0
- package/types/index.d.ts +190 -0
- package/types/taro.api.d.ts +130 -0
- package/types/taro.component.d.ts +168 -0
- package/types/taro.config.d.ts +712 -0
- package/types/taro.lifecycle.d.ts +220 -0
- package/types/taro.runtime.d.ts +9 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import Taro from '../../index'
|
|
2
|
+
|
|
3
|
+
declare module '../../index' {
|
|
4
|
+
namespace updateShareMenu {
|
|
5
|
+
interface Option {
|
|
6
|
+
/** 是否使用带 shareTicket 的转发[详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html)
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
withShareTicket?: boolean
|
|
10
|
+
/** 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/updatable-message.html)
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
isUpdatableMessage?: boolean
|
|
14
|
+
/** 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/miniprogram/dev/api/share/errorupdatableMessage.createActivityId)) 接口获取
|
|
15
|
+
*/
|
|
16
|
+
activityId?: string
|
|
17
|
+
/** 群待办消息的id,通过toDoActivityId可以把多个群待办消息聚合为同一个。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/miniprogram/dev/api/share/errorupdatableMessage.createActivityId) 接口获取。详见[群待办消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html
|
|
18
|
+
*/
|
|
19
|
+
toDoActivityId?: string
|
|
20
|
+
/** 动态消息的模板信息
|
|
21
|
+
*/
|
|
22
|
+
templateInfo?: UpdatableMessageFrontEndTemplateInfo
|
|
23
|
+
/** 是否是私密消息。详见 [小程序私密消息](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share/private-message.html)
|
|
24
|
+
*/
|
|
25
|
+
isPrivateMessage?: boolean
|
|
26
|
+
/** 参与用户此聊天室下的 group_openid 列表
|
|
27
|
+
* @default []
|
|
28
|
+
*/
|
|
29
|
+
participant?: string[]
|
|
30
|
+
/** 聊天工具模式特殊动态消息
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
33
|
+
useForChatTool?: boolean
|
|
34
|
+
/** 指定成员的方式
|
|
35
|
+
* @default 1
|
|
36
|
+
*/
|
|
37
|
+
chooseType?: number
|
|
38
|
+
/** 接口调用成功的回调函数 */
|
|
39
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
40
|
+
/** 接口调用失败的回调函数 */
|
|
41
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
42
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
43
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/** 动态消息的模板信息 */
|
|
47
|
+
interface UpdatableMessageFrontEndTemplateInfo {
|
|
48
|
+
/** 参数列表 */
|
|
49
|
+
parameterList: UpdatableMessageFrontEndParameter[]
|
|
50
|
+
/** 模板ID */
|
|
51
|
+
templateId: string
|
|
52
|
+
}
|
|
53
|
+
/** 参数列表 */
|
|
54
|
+
interface UpdatableMessageFrontEndParameter {
|
|
55
|
+
/** 参数名 */
|
|
56
|
+
name: string
|
|
57
|
+
/** 参数值 */
|
|
58
|
+
value: string
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
namespace showShareMenu {
|
|
63
|
+
interface Option {
|
|
64
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
65
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
66
|
+
/** 接口调用失败的回调函数 */
|
|
67
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
68
|
+
/** 接口调用成功的回调函数 */
|
|
69
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
70
|
+
/** 是否使用带 shareTicket 的转发[详情](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html) */
|
|
71
|
+
withShareTicket?: boolean
|
|
72
|
+
/** QQ小程序分享功能,支持分享到QQ、QQ空间、微信好友、微信朋友圈
|
|
73
|
+
* @supported weapp, qq
|
|
74
|
+
* @qq QQ支持的值: ['qq', 'qzone', 'wechatFriends', 'wechatMoment']
|
|
75
|
+
* @weapp 微信支持:['wechatFriends', 'wechatMoment'] / ['shareAppMessage', 'shareTimeline']
|
|
76
|
+
*/
|
|
77
|
+
showShareItems?: string[]
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
namespace showShareImageMenu {
|
|
82
|
+
interface Option {
|
|
83
|
+
/** 要分享的图片地址,必须为本地路径或临时路径 */
|
|
84
|
+
path: string
|
|
85
|
+
/** 接口调用成功的回调函数 */
|
|
86
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
87
|
+
/** 接口调用失败的回调函数 */
|
|
88
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
89
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
90
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
namespace shareVideoMessage {
|
|
95
|
+
interface Option {
|
|
96
|
+
/** 要分享的视频地址,必须为本地路径或临时路径 */
|
|
97
|
+
videoPath: string
|
|
98
|
+
/** 缩略图路径,若留空则使用视频首帧 */
|
|
99
|
+
thumbPath?: string
|
|
100
|
+
/** 接口调用成功的回调函数 */
|
|
101
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
102
|
+
/** 接口调用失败的回调函数 */
|
|
103
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
104
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
105
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
namespace shareFileMessage {
|
|
110
|
+
interface Option {
|
|
111
|
+
/** 要分享的视频地址,必须为本地路径或临时路径 */
|
|
112
|
+
filePath: string
|
|
113
|
+
/** 自定义文件名,若留空则使用 filePath 中的文件名 */
|
|
114
|
+
fileName?: string
|
|
115
|
+
/** 接口调用成功的回调函数 */
|
|
116
|
+
success?: (res: TaroGeneral.CallbackResult) => void
|
|
117
|
+
/** 接口调用失败的回调函数 */
|
|
118
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
119
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
120
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
namespace onCopyUrl {
|
|
124
|
+
/** 用户点击右上角菜单的「复制链接」按钮时触发的事件的回调函数 */
|
|
125
|
+
type Callback = (result: CallbackResult) => void
|
|
126
|
+
|
|
127
|
+
interface CallbackResult {
|
|
128
|
+
/** 用短链打开小程序时当前页面携带的查询字符串。小程序中使用时,应在进入页面时调用 `Taro.onCopyUrl` 自定义 `query`,退出页面时调用 `Taro.offCopyUrl`,防止影响其它页面。 */
|
|
129
|
+
query: string
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
namespace hideShareMenu {
|
|
134
|
+
interface Option {
|
|
135
|
+
/** 本接口为 Beta 版本,暂只在 Android 平台支持。需要隐藏的转发按钮名称列表,默认['shareAppMessage', 'shareTimeline']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 */
|
|
136
|
+
menus?: string[]
|
|
137
|
+
/** 接口调用成功的回调函数 */
|
|
138
|
+
success?: (result: TaroGeneral.CallbackResult) => void
|
|
139
|
+
/** 接口调用失败的回调函数 */
|
|
140
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
141
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
142
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
namespace getShareInfo {
|
|
147
|
+
interface Option {
|
|
148
|
+
/** shareTicket */
|
|
149
|
+
shareTicket: string
|
|
150
|
+
/** 超时时间,单位 ms */
|
|
151
|
+
timeout?: number
|
|
152
|
+
/** 接口调用成功的回调函数 */
|
|
153
|
+
success?: (result: SuccessCallbackResult) => void
|
|
154
|
+
/** 接口调用失败的回调函数 */
|
|
155
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
156
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
157
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
161
|
+
/** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
|
|
162
|
+
cloudID?: string
|
|
163
|
+
/** 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
|
|
164
|
+
encryptedData: string
|
|
165
|
+
/** 错误信息 */
|
|
166
|
+
errMsg: string
|
|
167
|
+
/** 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
|
|
168
|
+
iv: string
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
namespace authPrivateMessage {
|
|
173
|
+
interface Option {
|
|
174
|
+
/** shareTicket */
|
|
175
|
+
shareTicket: string
|
|
176
|
+
/** 接口调用成功的回调函数 */
|
|
177
|
+
success?: (result: SuccessCallbackResult) => void
|
|
178
|
+
/** 接口调用失败的回调函数 */
|
|
179
|
+
fail?: (res: TaroGeneral.CallbackResult) => void
|
|
180
|
+
/** 接口调用结束的回调函数(调用成功、失败都会执行) */
|
|
181
|
+
complete?: (res: TaroGeneral.CallbackResult) => void
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
interface SuccessCallbackResult extends TaroGeneral.CallbackResult {
|
|
185
|
+
/** 敏感数据对应的云 ID,开通[云开发](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#method-cloud) */
|
|
186
|
+
cloudID?: string
|
|
187
|
+
/** 包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
|
|
188
|
+
encryptedData: string
|
|
189
|
+
/** 错误信息 */
|
|
190
|
+
errMsg: string
|
|
191
|
+
/** 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html) */
|
|
192
|
+
iv: string
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
interface TaroStatic {
|
|
197
|
+
/** 更新转发属性
|
|
198
|
+
* @supported weapp
|
|
199
|
+
* @example
|
|
200
|
+
* ```tsx
|
|
201
|
+
* Taro.updateShareMenu({
|
|
202
|
+
* withShareTicket: true,
|
|
203
|
+
* success () { }
|
|
204
|
+
* })
|
|
205
|
+
* ```
|
|
206
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.updateShareMenu.html
|
|
207
|
+
*/
|
|
208
|
+
updateShareMenu (option: updateShareMenu.Option): Promise<TaroGeneral.CallbackResult>
|
|
209
|
+
|
|
210
|
+
/** 显示当前页面的转发按钮
|
|
211
|
+
* @supported weapp, qq, tt
|
|
212
|
+
* @example
|
|
213
|
+
* ```tsx
|
|
214
|
+
* Taro.showShareMenu({
|
|
215
|
+
* withShareTicket: true
|
|
216
|
+
* })
|
|
217
|
+
* ```
|
|
218
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareMenu.html
|
|
219
|
+
*/
|
|
220
|
+
showShareMenu (option: showShareMenu.Option): Promise<TaroGeneral.CallbackResult>
|
|
221
|
+
|
|
222
|
+
/** 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
|
|
223
|
+
* @supported weapp
|
|
224
|
+
* @example
|
|
225
|
+
* ```tsx
|
|
226
|
+
* Taro.downloadFile({
|
|
227
|
+
* url: 'https://res.wx.qq.com/wxdoc/dist/assets/img/demo.ef5c5bef.jpg',
|
|
228
|
+
* success: (res) => {
|
|
229
|
+
* Taro.showShareImageMenu({
|
|
230
|
+
* path: res.tempFilePath
|
|
231
|
+
* })
|
|
232
|
+
* }
|
|
233
|
+
* })
|
|
234
|
+
* ```
|
|
235
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.showShareImageMenu.html
|
|
236
|
+
*/
|
|
237
|
+
showShareImageMenu (option: showShareImageMenu.Option): Promise<TaroGeneral.CallbackResult>
|
|
238
|
+
|
|
239
|
+
/** 转发视频到聊天
|
|
240
|
+
* @supported weapp
|
|
241
|
+
* @example
|
|
242
|
+
* callback 写法
|
|
243
|
+
*
|
|
244
|
+
* ```tsx
|
|
245
|
+
* Taro.downloadFile({
|
|
246
|
+
* url: URL, // 下载url
|
|
247
|
+
* success (res) {
|
|
248
|
+
* // 下载完成后转发
|
|
249
|
+
* Taro.shareVideoMessage({
|
|
250
|
+
* videoPath: res.tempFilePath,
|
|
251
|
+
* success() {},
|
|
252
|
+
* fail: console.error,
|
|
253
|
+
* })
|
|
254
|
+
* },
|
|
255
|
+
* fail: console.error,
|
|
256
|
+
* })
|
|
257
|
+
* ```
|
|
258
|
+
*
|
|
259
|
+
* async await 写法
|
|
260
|
+
*
|
|
261
|
+
* ```tsx
|
|
262
|
+
* const { tempFilePath } = await Taro.downloadFile({
|
|
263
|
+
* url: URL, // 下载url
|
|
264
|
+
* })
|
|
265
|
+
* // 下载完成后转发
|
|
266
|
+
* await Taro.shareVideoMessage({
|
|
267
|
+
* videoPath: res.tempFilePath,
|
|
268
|
+
* })
|
|
269
|
+
* ```
|
|
270
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.shareVideoMessage.html
|
|
271
|
+
*/
|
|
272
|
+
shareVideoMessage (option: shareVideoMessage.Option): Promise<TaroGeneral.CallbackResult>
|
|
273
|
+
|
|
274
|
+
/** 转发文件到聊天
|
|
275
|
+
* @supported weapp
|
|
276
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.shareFileMessage.html
|
|
277
|
+
*/
|
|
278
|
+
shareFileMessage (option: shareFileMessage.Option): Promise<TaroGeneral.CallbackResult>
|
|
279
|
+
|
|
280
|
+
/** 监听用户点击右上角菜单的「复制链接」按钮时触发的事件
|
|
281
|
+
*
|
|
282
|
+
* > 本接口为 Beta 版本,暂只在 Android 平台支持。
|
|
283
|
+
* @supported weapp
|
|
284
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.onCopyUrl.html
|
|
285
|
+
*/
|
|
286
|
+
onCopyUrl (
|
|
287
|
+
/** 用户点击右上角菜单的「复制链接」按钮时触发的事件的回调函数 */
|
|
288
|
+
callback: onCopyUrl.Callback,
|
|
289
|
+
): void
|
|
290
|
+
|
|
291
|
+
/** 取消监听用户点击右上角菜单的「复制链接」按钮时触发的事件
|
|
292
|
+
*
|
|
293
|
+
* > 本接口为 Beta 版本,暂只在 Android 平台支持。
|
|
294
|
+
* @supported weapp
|
|
295
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.offCopyUrl.html
|
|
296
|
+
*/
|
|
297
|
+
offCopyUrl (
|
|
298
|
+
/** 用户点击右上角菜单的「复制链接」按钮时触发的事件的回调函数 */
|
|
299
|
+
callback: onCopyUrl.Callback,
|
|
300
|
+
): void
|
|
301
|
+
|
|
302
|
+
/** 隐藏当前页面的转发按钮
|
|
303
|
+
* @supported weapp, tt
|
|
304
|
+
* @example
|
|
305
|
+
* ```tsx
|
|
306
|
+
* Taro.hideShareMenu()
|
|
307
|
+
* ```
|
|
308
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.hideShareMenu.html
|
|
309
|
+
*/
|
|
310
|
+
hideShareMenu (option?: hideShareMenu.Option): Promise<TaroGeneral.CallbackResult>
|
|
311
|
+
|
|
312
|
+
/** 获取转发详细信息
|
|
313
|
+
*
|
|
314
|
+
* **Tips**
|
|
315
|
+
* - 如需要展示群名称,可以使用[开放数据组件](/docs/components/open/open-data)
|
|
316
|
+
* @supported weapp
|
|
317
|
+
* @example
|
|
318
|
+
* 敏感数据有两种获取方式,一是使用 [加密数据解密算法](https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/signature.html#%E5%8A%A0%E5%AF%86%E6%95%B0%E6%8D%AE%E8%A7%A3%E5%AF%86%E7%AE%97%E6%B3%95) 。
|
|
319
|
+
* 获取得到的开放数据为以下 json 结构(其中 openGId 为当前群的唯一标识):
|
|
320
|
+
* ```json
|
|
321
|
+
* {
|
|
322
|
+
* "openGId": "OPENGID"
|
|
323
|
+
* }
|
|
324
|
+
* ```
|
|
325
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.getShareInfo.html
|
|
326
|
+
*/
|
|
327
|
+
getShareInfo (option: getShareInfo.Option): Promise<getShareInfo.SuccessCallbackResult>
|
|
328
|
+
|
|
329
|
+
/** 验证私密消息
|
|
330
|
+
* @supported weapp
|
|
331
|
+
* @example
|
|
332
|
+
* ```tsx
|
|
333
|
+
* Taro.authPrivateMessage({
|
|
334
|
+
* shareTicket: 'xxxxxx',
|
|
335
|
+
* success(res) {
|
|
336
|
+
* console.log('authPrivateMessage success', res)
|
|
337
|
+
* // res
|
|
338
|
+
* // {
|
|
339
|
+
* // errMsg: 'authPrivateMessage:ok'
|
|
340
|
+
* // valid: true
|
|
341
|
+
* // iv: 'xxxx',
|
|
342
|
+
* // encryptedData: 'xxxxxx'
|
|
343
|
+
* // }
|
|
344
|
+
* },
|
|
345
|
+
* fail(res) {
|
|
346
|
+
* console.log('authPrivateMessage fail', res)
|
|
347
|
+
* }
|
|
348
|
+
* })
|
|
349
|
+
* ```
|
|
350
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/api/share/wx.authPrivateMessage.html
|
|
351
|
+
*/
|
|
352
|
+
authPrivateMessage (option: authPrivateMessage.Option): Promise<authPrivateMessage.SuccessCallbackResult>
|
|
353
|
+
}
|
|
354
|
+
}
|