jubo-sdk 1.1.2 → 1.1.4
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 +385 -385
- package/dist/index.cjs.js +10 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +10 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1744,7 +1744,7 @@ var String$1 = global$8.String;
|
|
|
1744
1744
|
var counter = 0;
|
|
1745
1745
|
var queue$2 = {};
|
|
1746
1746
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1747
|
-
var $location, defer, channel, port;
|
|
1747
|
+
var $location, defer, channel$1, port;
|
|
1748
1748
|
|
|
1749
1749
|
fails$9(function () {
|
|
1750
1750
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
@@ -1802,9 +1802,9 @@ if (!set || !clear) {
|
|
|
1802
1802
|
// Browsers with MessageChannel, includes WebWorkers
|
|
1803
1803
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
1804
1804
|
} else if (MessageChannel && !IS_IOS$1) {
|
|
1805
|
-
channel = new MessageChannel();
|
|
1806
|
-
port = channel.port2;
|
|
1807
|
-
channel.port1.onmessage = eventListener;
|
|
1805
|
+
channel$1 = new MessageChannel();
|
|
1806
|
+
port = channel$1.port2;
|
|
1807
|
+
channel$1.port1.onmessage = eventListener;
|
|
1808
1808
|
defer = bind$3(port.postMessage, port);
|
|
1809
1809
|
// Browsers with postMessage, skip WebWorkers
|
|
1810
1810
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
@@ -6057,7 +6057,7 @@ var JuboSdk = /** @class */function () {
|
|
|
6057
6057
|
return '';
|
|
6058
6058
|
}
|
|
6059
6059
|
var toUrl = (res === null || res === void 0 ? void 0 : res.val) || '';
|
|
6060
|
-
toUrl.replace(/\{(.*?)}/g, function (_, key) {
|
|
6060
|
+
toUrl = toUrl.replace(/\{(.*?)}/g, function (_, key) {
|
|
6061
6061
|
return params[key.trim()] || '';
|
|
6062
6062
|
});
|
|
6063
6063
|
toUrl = toUrl.replace(/{.*}/g, '');
|
|
@@ -6082,6 +6082,7 @@ var JuboSdk = /** @class */function () {
|
|
|
6082
6082
|
if (!this.detection && this.isMiniProgram) return '';
|
|
6083
6083
|
try {
|
|
6084
6084
|
var res = dsbridge.call('getToken', {});
|
|
6085
|
+
if (typeof res === 'string') res = JSON.parse(res);
|
|
6085
6086
|
return res === null || res === void 0 ? void 0 : res.token;
|
|
6086
6087
|
} catch (error) {
|
|
6087
6088
|
console.error('juboSDK.getToken error', error);
|
|
@@ -6566,6 +6567,7 @@ var JuboSdk = /** @class */function () {
|
|
|
6566
6567
|
return window.screen.height >= 812 && window.devicePixelRatio >= 2 ? 44 : 20;
|
|
6567
6568
|
} else {
|
|
6568
6569
|
var res = dsbridge.call('getStatusBarHeight', {});
|
|
6570
|
+
if (typeof res === 'string') res = JSON.parse(res);
|
|
6569
6571
|
return res === null || res === void 0 ? void 0 : res.height;
|
|
6570
6572
|
}
|
|
6571
6573
|
} catch (error) {
|
|
@@ -6597,9 +6599,11 @@ var urlData = urlToParams(url);
|
|
|
6597
6599
|
var device = urlData.device || ls.get('device') || '';
|
|
6598
6600
|
var isfull = urlData.isfull || ls.get('isfull') || '';
|
|
6599
6601
|
var version = urlData.version || ls.get('version') || '';
|
|
6602
|
+
var channel = urlData.channel || ls.get('channel') || '';
|
|
6600
6603
|
ls.set('device', device);
|
|
6601
6604
|
ls.set('isfull', isfull);
|
|
6602
6605
|
ls.set('version', version);
|
|
6606
|
+
ls.set('channel', channel);
|
|
6603
6607
|
if (process.env.NODE_ENV === 'development') {
|
|
6604
6608
|
updateNotifier(pkg.name, pkg.version, pkg.updateDoc);
|
|
6605
6609
|
}
|
|
@@ -6608,6 +6612,6 @@ exports.default = JuboSdk;
|
|
|
6608
6612
|
exports.ls = ls;
|
|
6609
6613
|
|
|
6610
6614
|
if(typeof window !== 'undefined') {
|
|
6611
|
-
window._juboSDK_VERSION_ = '1.1.
|
|
6615
|
+
window._juboSDK_VERSION_ = '1.1.4'
|
|
6612
6616
|
}
|
|
6613
6617
|
//# sourceMappingURL=index.cjs.js.map
|