qsh-webview-sdk 2.3.6 → 2.3.7
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/dist/index.d.ts
CHANGED
|
@@ -228,36 +228,49 @@ declare namespace UniWebView {
|
|
|
228
228
|
type: "weixin" | "plus" | "nvue" | "uvue" | "UniApp" | "webview" | "h5" | "offline";
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
/**
|
|
231
|
+
/** 定向分享:去向。chat=聊天框,timeline=朋友圈 */
|
|
232
232
|
type ShareUniversalScene = "chat" | "timeline";
|
|
233
233
|
|
|
234
|
-
/**
|
|
234
|
+
/**
|
|
235
|
+
* 图文分享参数。
|
|
236
|
+
* - 微信小程序环境:target 必须是 /pages/... 页面路径
|
|
237
|
+
* - App 环境:优先使用 target;若 target 不合法,再使用 webTarget 兜底
|
|
238
|
+
*/
|
|
235
239
|
interface ShareUniversalPayloadWeb {
|
|
236
240
|
title: string;
|
|
237
241
|
description: string;
|
|
238
242
|
imageUrl: string;
|
|
239
|
-
/**
|
|
240
|
-
|
|
241
|
-
/** App
|
|
242
|
-
|
|
243
|
+
/** 当前环境下的主目标:小程序传 /pages/...;App 传 https://... */
|
|
244
|
+
target: string;
|
|
245
|
+
/** 仅 App 环境使用:当 target 不存在或不合法时,使用该公网链接兜底 */
|
|
246
|
+
webTarget?: string;
|
|
243
247
|
}
|
|
244
248
|
|
|
249
|
+
/**
|
|
250
|
+
* 文字分享参数。
|
|
251
|
+
* - App 环境下会自动降级为图文分享
|
|
252
|
+
* - target / webTarget 的校验规则与图文分享一致
|
|
253
|
+
*/
|
|
245
254
|
interface ShareUniversalPayloadText {
|
|
246
255
|
title?: string;
|
|
247
256
|
description: string;
|
|
248
257
|
imageUrl?: string;
|
|
249
|
-
/**
|
|
250
|
-
|
|
251
|
-
/** App
|
|
252
|
-
|
|
258
|
+
/** 当前环境下的主目标:小程序传 /pages/...;App 传 https://... */
|
|
259
|
+
target: string;
|
|
260
|
+
/** 仅 App 环境使用:当 target 不存在或不合法时,使用该公网链接兜底 */
|
|
261
|
+
webTarget?: string;
|
|
253
262
|
}
|
|
254
263
|
|
|
264
|
+
/**
|
|
265
|
+
* 图片分享参数。
|
|
266
|
+
* - target / webTarget 的校验规则与图文分享一致
|
|
267
|
+
*/
|
|
255
268
|
interface ShareUniversalPayloadImage {
|
|
256
269
|
imageUrl: string;
|
|
257
|
-
/**
|
|
258
|
-
|
|
259
|
-
/** App
|
|
260
|
-
|
|
270
|
+
/** 当前环境下的主目标:小程序传 /pages/...;App 传 https://... */
|
|
271
|
+
target: string;
|
|
272
|
+
/** 仅 App 环境使用:当 target 不存在或不合法时,使用该公网链接兜底 */
|
|
273
|
+
webTarget?: string;
|
|
261
274
|
title?: string;
|
|
262
275
|
}
|
|
263
276
|
|
|
@@ -279,7 +292,11 @@ declare namespace UniWebView {
|
|
|
279
292
|
[key: string]: any;
|
|
280
293
|
}
|
|
281
294
|
|
|
282
|
-
/**
|
|
295
|
+
/**
|
|
296
|
+
* 定向分享模块参数(仅 H5 嵌入宿主 WebView 场景)。
|
|
297
|
+
* - 微信小程序环境:只校验 payload.target,且必须是 /pages/...
|
|
298
|
+
* - App 环境:优先校验 payload.target 是否为公网链接;若不合法,再校验 payload.webTarget
|
|
299
|
+
*/
|
|
283
300
|
interface ShareDirectedOptions {
|
|
284
301
|
kind: "web" | "text" | "image";
|
|
285
302
|
scene?: 0 | 1 | ShareUniversalScene;
|
|
@@ -289,6 +306,11 @@ declare namespace UniWebView {
|
|
|
289
306
|
complete?: () => void;
|
|
290
307
|
}
|
|
291
308
|
|
|
309
|
+
/**
|
|
310
|
+
* 小程序卡片分享参数。
|
|
311
|
+
* - targetPath 始终表示小程序落地页路径
|
|
312
|
+
* - webUrl 只在 App 环境下参与校验和配参,小程序环境不会使用该字段决定落地页
|
|
313
|
+
*/
|
|
292
314
|
interface ShareMiniProgramCardPayload {
|
|
293
315
|
title: string;
|
|
294
316
|
imageUrl: string;
|
|
@@ -298,12 +320,10 @@ declare namespace UniWebView {
|
|
|
298
320
|
appid: string;
|
|
299
321
|
/** 小程序环境版本 */
|
|
300
322
|
envVersion?: "release" | "trial" | "develop";
|
|
301
|
-
/**
|
|
302
|
-
|
|
323
|
+
/** App 环境分享时使用的网页兜底链接,必须是公网 https/http 链接 */
|
|
324
|
+
webUrl?: string;
|
|
303
325
|
/** 小程序卡片描述 */
|
|
304
326
|
description?: string;
|
|
305
|
-
/** 预留:若宿主 App 通道需要,也可传 shareLink */
|
|
306
|
-
shareLink?: string;
|
|
307
327
|
}
|
|
308
328
|
|
|
309
329
|
interface ShareMiniProgramCardOptions {
|
|
@@ -520,21 +540,5 @@ declare namespace UniWebView {
|
|
|
520
540
|
* 全局 qsh/uni 对象(默认导出为模块默认值)
|
|
521
541
|
*/
|
|
522
542
|
declare const qsh: UniWebView.Uni;
|
|
523
|
-
declare const uni: UniWebView.Uni;
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
* 模块导出
|
|
527
|
-
*/
|
|
528
543
|
export default qsh;
|
|
529
|
-
|
|
530
|
-
/**
|
|
531
|
-
* 全局声明
|
|
532
|
-
*/
|
|
533
|
-
declare global {
|
|
534
|
-
interface Window {
|
|
535
|
-
qsh: UniWebView.Uni;
|
|
536
|
-
UniAppJSBridge?: boolean;
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
544
|
export as namespace qsh;
|