crh-jssdk 1.0.47 → 1.0.49
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.
|
@@ -71,7 +71,8 @@ exports.default = {
|
|
|
71
71
|
return {
|
|
72
72
|
isDYQHZQ: ua.includes("qsid/591"), // 东亚前海
|
|
73
73
|
isIOS: utils_1.ios,
|
|
74
|
-
isAndroid: /Android/i.test(ua),
|
|
74
|
+
isAndroid: /Android/i.test(ua) && !/OpenHarmony/i.test(ua),
|
|
75
|
+
isHarmony: /OpenHarmony/i.test(ua),
|
|
75
76
|
ua: ua,
|
|
76
77
|
};
|
|
77
78
|
},
|
|
@@ -140,26 +141,29 @@ exports.default = {
|
|
|
140
141
|
url = params.url, _a = params.needTitle, needTitle = _a === void 0 ? true : _a, _b = params.isWt, isWt = _b === void 0 ? false : _b;
|
|
141
142
|
_c.label = 1;
|
|
142
143
|
case 1:
|
|
143
|
-
_c.trys.push([1,
|
|
144
|
-
|
|
145
|
-
if (!
|
|
146
|
-
|
|
147
|
-
return [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
case
|
|
144
|
+
_c.trys.push([1, 4, , 5]);
|
|
145
|
+
console.log("---dyqhzq", this.webviewType().isHarmony);
|
|
146
|
+
if (!this.webviewType().isHarmony) return [3 /*break*/, 3];
|
|
147
|
+
console.log("---harmonygotoSdkPage", url);
|
|
148
|
+
return [4 /*yield*/, utils_1.dyqhzqBridge.bridgeCallHandler("Promise", "gotoSdkPage", {
|
|
149
|
+
h5Url: url,
|
|
150
|
+
isNeedWtLogin: '1'
|
|
151
|
+
})];
|
|
152
|
+
case 2:
|
|
152
153
|
_c.sent();
|
|
153
|
-
|
|
154
|
-
case
|
|
155
|
-
|
|
154
|
+
return [2 /*return*/];
|
|
155
|
+
case 3:
|
|
156
|
+
if (utils_1.ios) {
|
|
157
|
+
window.location.href = "client.html?action=buildInSdk^isSdkNeedWTLogin=1^isNeedLogin=1^h5Url=".concat(url);
|
|
158
|
+
return [2 /*return*/];
|
|
159
|
+
}
|
|
156
160
|
window.location.href = "client.html?action=buildInSdk^h5Url=".concat(url, "^isHiddenNavigationBar=").concat(needTitle ? 1 : 0, "^isHiddenBottomBar=1^isNeedWtLogin=1");
|
|
157
|
-
return [3 /*break*/,
|
|
158
|
-
case
|
|
161
|
+
return [3 /*break*/, 5];
|
|
162
|
+
case 4:
|
|
159
163
|
error_3 = _c.sent();
|
|
160
164
|
console.error("东亚前海跳转客户端页面失败:", error_3);
|
|
161
165
|
return [2 /*return*/, { success: false }];
|
|
162
|
-
case
|
|
166
|
+
case 5: return [2 /*return*/];
|
|
163
167
|
}
|
|
164
168
|
});
|
|
165
169
|
});
|
|
@@ -265,7 +265,7 @@ exports.default = {
|
|
|
265
265
|
case 0:
|
|
266
266
|
_a.trys.push([0, 2, , 3]);
|
|
267
267
|
params = { imageData: imageData };
|
|
268
|
-
console.log("
|
|
268
|
+
console.log("保存图片", params);
|
|
269
269
|
return [4 /*yield*/, utils_1.globalBridge.bridgeCallHandler("Promise", "saveImageToAlbum", params)];
|
|
270
270
|
case 1:
|
|
271
271
|
result = _a.sent();
|
|
@@ -387,6 +387,11 @@ exports.default = {
|
|
|
387
387
|
});
|
|
388
388
|
});
|
|
389
389
|
},
|
|
390
|
+
/**
|
|
391
|
+
* 下载文件
|
|
392
|
+
* @param url 文件url
|
|
393
|
+
* @param title 文件标题
|
|
394
|
+
*/
|
|
390
395
|
/**
|
|
391
396
|
* 在app内打开pdf文件
|
|
392
397
|
*/
|
package/dist/business/index.js
CHANGED
|
@@ -468,6 +468,13 @@ var BUSINESS = /** @class */ (function () {
|
|
|
468
468
|
}
|
|
469
469
|
return this.sdkObj.onPageHide(cb);
|
|
470
470
|
};
|
|
471
|
+
// 保存图片到相册(仅限联储证券iOS使用)
|
|
472
|
+
BUSINESS.prototype.saveImageToAlbum = function (params) {
|
|
473
|
+
if (!this.sdkObj.saveImageToAlbum) {
|
|
474
|
+
return (0, utils_1.empty)("saveImageToAlbum");
|
|
475
|
+
}
|
|
476
|
+
return this.sdkObj.saveImageToAlbum(params);
|
|
477
|
+
};
|
|
471
478
|
return BUSINESS;
|
|
472
479
|
}());
|
|
473
480
|
exports.default = BUSINESS;
|