crh-jssdk 1.0.16 → 1.0.17
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.
|
@@ -133,36 +133,42 @@ exports.default = {
|
|
|
133
133
|
*/
|
|
134
134
|
goWebview: function (params) {
|
|
135
135
|
return __awaiter(this, void 0, void 0, function () {
|
|
136
|
-
var url, _a, needTitle, _b, isWt,
|
|
136
|
+
var url, _a, needTitle, _b, isWt, gotoUrl, error_3;
|
|
137
137
|
return __generator(this, function (_c) {
|
|
138
138
|
switch (_c.label) {
|
|
139
139
|
case 0:
|
|
140
140
|
url = params.url, _a = params.needTitle, needTitle = _a === void 0 ? true : _a, _b = params.isWt, isWt = _b === void 0 ? false : _b;
|
|
141
141
|
_c.label = 1;
|
|
142
142
|
case 1:
|
|
143
|
-
_c.trys.push([1,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
143
|
+
_c.trys.push([1, 9, , 10]);
|
|
144
|
+
if (!isWt) return [3 /*break*/, 5];
|
|
145
|
+
if (!utils_1.ios) return [3 /*break*/, 2];
|
|
146
|
+
window.location.href = url;
|
|
147
|
+
return [3 /*break*/, 4];
|
|
148
|
+
case 2: return [4 /*yield*/, utils_1.jyBridge.bridgeCallHandler("Promise", "gotoNextPage", {
|
|
149
|
+
url: url,
|
|
150
|
+
})];
|
|
151
|
+
case 3:
|
|
152
|
+
_c.sent();
|
|
153
|
+
_c.label = 4;
|
|
154
|
+
case 4: return [2 /*return*/];
|
|
155
|
+
case 5:
|
|
156
|
+
if (!utils_1.ios) return [3 /*break*/, 6];
|
|
157
|
+
window.location.href = "client://hxsecurity.frame.router/5032?url=".concat(url, "&rp_flag_push_to_stack_directly=1&isHiddenNavigationBar=1&isHiddenBottomBar=1&isNeedWtLogin=1");
|
|
158
|
+
return [2 /*return*/];
|
|
159
|
+
case 6:
|
|
160
|
+
gotoUrl = "client.html?action=ymtz^webid=2792^url=".concat(url, "^isHiddenNavigationBar=").concat(needTitle ? 1 : 0, "^isHiddenBottomBar=1^isNeedWtLogin=1");
|
|
156
161
|
return [4 /*yield*/, utils_1.jyBridge.bridgeCallHandler("Promise", "gotoNextPage", {
|
|
157
162
|
url: gotoUrl,
|
|
158
163
|
})];
|
|
159
|
-
case
|
|
160
|
-
case 3
|
|
164
|
+
case 7: return [2 /*return*/, _c.sent()];
|
|
165
|
+
case 8: return [3 /*break*/, 10];
|
|
166
|
+
case 9:
|
|
161
167
|
error_3 = _c.sent();
|
|
162
168
|
console.error("金圆统一跳转客户端页面失败:", error_3);
|
|
163
169
|
// 降级方案:使用 goWebview
|
|
164
170
|
return [2 /*return*/, { success: false }];
|
|
165
|
-
case
|
|
171
|
+
case 10: return [2 /*return*/];
|
|
166
172
|
}
|
|
167
173
|
});
|
|
168
174
|
});
|