crh-jssdk 1.0.17 → 1.0.18
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.
|
@@ -198,6 +198,10 @@ exports.default = {
|
|
|
198
198
|
return __generator(this, function (_a) {
|
|
199
199
|
console.log("设置状态栏参数:", params);
|
|
200
200
|
try {
|
|
201
|
+
// 缓存到 sessionStorage,initLczq 中重新进入页面时兜底恢复
|
|
202
|
+
if (params) {
|
|
203
|
+
window.sessionStorage.setItem('__crh_statusbar_params', JSON.stringify(params));
|
|
204
|
+
}
|
|
201
205
|
console.log("ios && params?.wordColorStyle", utils_1.ios && (params === null || params === void 0 ? void 0 : params.wordColorStyle));
|
|
202
206
|
utils_1.globalBridge.bridgeCallHandler("", "modifyStatusColor", {
|
|
203
207
|
statusColor: params.color,
|
|
@@ -440,4 +444,22 @@ exports.default = {
|
|
|
440
444
|
getBridge: function () {
|
|
441
445
|
return utils_1.globalBridge;
|
|
442
446
|
},
|
|
447
|
+
/**
|
|
448
|
+
* 注册 H5 监听页面容器回到前台的生命周期事件
|
|
449
|
+
* @param cb 回调函数,切换到前台时触发
|
|
450
|
+
*/
|
|
451
|
+
onPageShow: function (cb) {
|
|
452
|
+
utils_1.globalBridge.registerHandler('onShow', function () {
|
|
453
|
+
cb && cb();
|
|
454
|
+
});
|
|
455
|
+
},
|
|
456
|
+
/**
|
|
457
|
+
* 注册 H5 监听页面容器切换到后台的生命周期事件
|
|
458
|
+
* @param cb 回调函数,切换到后台时触发
|
|
459
|
+
*/
|
|
460
|
+
onPageHide: function (cb) {
|
|
461
|
+
utils_1.globalBridge.registerHandler('onHide', function () {
|
|
462
|
+
cb && cb();
|
|
463
|
+
});
|
|
464
|
+
},
|
|
443
465
|
};
|
package/dist/business/index.js
CHANGED
|
@@ -389,6 +389,20 @@ var BUSINESS = /** @class */ (function () {
|
|
|
389
389
|
}
|
|
390
390
|
return this.sdkObj.setMallViewPopStatus(params);
|
|
391
391
|
};
|
|
392
|
+
// 注册 H5 监听页面容器回到前台的生命周期事件(仅限联储证券使用)
|
|
393
|
+
BUSINESS.prototype.onPageShow = function (cb) {
|
|
394
|
+
if (!this.sdkObj.onPageShow) {
|
|
395
|
+
return (0, utils_1.empty)("onPageShow");
|
|
396
|
+
}
|
|
397
|
+
return this.sdkObj.onPageShow(cb);
|
|
398
|
+
};
|
|
399
|
+
// 注册 H5 监听页面容器切换到后台的生命周期事件(仅限联储证券使用)
|
|
400
|
+
BUSINESS.prototype.onPageHide = function (cb) {
|
|
401
|
+
if (!this.sdkObj.onPageHide) {
|
|
402
|
+
return (0, utils_1.empty)("onPageHide");
|
|
403
|
+
}
|
|
404
|
+
return this.sdkObj.onPageHide(cb);
|
|
405
|
+
};
|
|
392
406
|
return BUSINESS;
|
|
393
407
|
}());
|
|
394
408
|
exports.default = BUSINESS;
|