crh-jssdk 0.10.36 → 0.10.37
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.
|
@@ -151,14 +151,14 @@ exports.default = {
|
|
|
151
151
|
*/
|
|
152
152
|
setStatusBar: function (params) {
|
|
153
153
|
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
-
var error_3;
|
|
154
|
+
var style, error_3;
|
|
155
155
|
return __generator(this, function (_a) {
|
|
156
156
|
switch (_a.label) {
|
|
157
157
|
case 0:
|
|
158
158
|
console.log("设置状态栏参数:", params);
|
|
159
159
|
_a.label = 1;
|
|
160
160
|
case 1:
|
|
161
|
-
_a.trys.push([1,
|
|
161
|
+
_a.trys.push([1, 5, , 6]);
|
|
162
162
|
// 根据参考文件,使用setStatusBarState方法
|
|
163
163
|
return [4 /*yield*/, utils_1.globalBridge.bridgeCallHandler("Promise", "modifyStatusColor", {
|
|
164
164
|
statusColor: params.color,
|
|
@@ -166,13 +166,23 @@ exports.default = {
|
|
|
166
166
|
case 2:
|
|
167
167
|
// 根据参考文件,使用setStatusBarState方法
|
|
168
168
|
_a.sent();
|
|
169
|
+
if (!(utils_1.ios && (params === null || params === void 0 ? void 0 : params.wordColorStyle))) return [3 /*break*/, 4];
|
|
170
|
+
style = params.wordColorStyle === 0 ? "light" : "dark";
|
|
171
|
+
return [4 /*yield*/, utils_1.globalBridge.bridgeCallHandler("Promise", "LCStatusBar", {
|
|
172
|
+
style: style,
|
|
173
|
+
})];
|
|
174
|
+
case 3:
|
|
175
|
+
_a.sent();
|
|
176
|
+
console.log("设置iOS状态栏文字颜色成功:", style);
|
|
177
|
+
_a.label = 4;
|
|
178
|
+
case 4:
|
|
169
179
|
console.log("设置状态栏颜色成功");
|
|
170
180
|
return [2 /*return*/, { success: true }];
|
|
171
|
-
case
|
|
181
|
+
case 5:
|
|
172
182
|
error_3 = _a.sent();
|
|
173
183
|
console.error("设置状态栏颜色失败:", error_3);
|
|
174
184
|
throw error_3;
|
|
175
|
-
case
|
|
185
|
+
case 6: return [2 /*return*/];
|
|
176
186
|
}
|
|
177
187
|
});
|
|
178
188
|
});
|