@hylid/custom-jsapi 6.3.1 → 6.3.2
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.
|
@@ -9,13 +9,12 @@ var __assign = this && this.__assign || function () {
|
|
|
9
9
|
return __assign.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
import { stringify } from 'qs-es5';
|
|
12
|
+
import { getCallAppPage } from "../../utils";
|
|
12
13
|
export var getCallAppLink = function getCallAppLink(opt) {
|
|
13
14
|
var _a = opt || {},
|
|
14
15
|
appId = _a.appId,
|
|
15
16
|
query = _a.query,
|
|
16
|
-
debugConfig = _a.debugConfig
|
|
17
|
-
page = _a.page;
|
|
18
|
-
var destinationPath = encodeURIComponent(page);
|
|
17
|
+
debugConfig = _a.debugConfig;
|
|
19
18
|
var params = {};
|
|
20
19
|
if (debugConfig === null || debugConfig === void 0 ? void 0 : debugConfig.version) {
|
|
21
20
|
var token = debugConfig.token,
|
|
@@ -30,8 +29,19 @@ export var getCallAppLink = function getCallAppLink(opt) {
|
|
|
30
29
|
if (query) {
|
|
31
30
|
params = __assign(__assign({}, params), query);
|
|
32
31
|
}
|
|
32
|
+
var destinationPath = getCallAppPage(opt);
|
|
33
33
|
var extendedInfo = {
|
|
34
34
|
query: stringify(params)
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
var url = new URL('https://link.dana.id/miniprogram?params=');
|
|
37
|
+
if (appId) {
|
|
38
|
+
url.searchParams.set('params', "[appId=".concat(appId, "]"));
|
|
39
|
+
}
|
|
40
|
+
if (destinationPath) {
|
|
41
|
+
url.searchParams.set('destinationPath', destinationPath);
|
|
42
|
+
}
|
|
43
|
+
if (extendedInfo && Object.keys(extendedInfo).length > 0) {
|
|
44
|
+
url.searchParams.set('extendedInfo', JSON.stringify(extendedInfo));
|
|
45
|
+
}
|
|
46
|
+
return url.toString();
|
|
37
47
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hylid/custom-jsapi",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.2",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib"
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@hylid/call": "^6.3.
|
|
13
|
-
"@hylid/env": "^6.3.
|
|
14
|
-
"@hylid/types": "^6.3.
|
|
12
|
+
"@hylid/call": "^6.3.2",
|
|
13
|
+
"@hylid/env": "^6.3.2",
|
|
14
|
+
"@hylid/types": "^6.3.2",
|
|
15
15
|
"qs-es5": "^6.8.4"
|
|
16
16
|
},
|
|
17
17
|
"license": "MIT",
|