@pisell/utils 1.0.42 → 1.0.43

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.
@@ -101,12 +101,8 @@ function getComposedBridge(deviceType) {
101
101
  onError === null || onError === void 0 ? void 0 : onError();
102
102
  return;
103
103
  }
104
- androidBridge.callHandler(apiName, params, callback, function (e) {
105
- console.log(e, '--- 调用android api报错:', apiName);
106
- if (onError) {
107
- onError === null || onError === void 0 ? void 0 : onError(e);
108
- }
109
- });
104
+ var res = androidBridge.callHandler(apiName, JSON.stringify(params));
105
+ callback(res);
110
106
  } else {
111
107
  onError === null || onError === void 0 ? void 0 : onError();
112
108
  console.log('--- 没获取到js bridge ---');
@@ -113,12 +113,8 @@ function getComposedBridge(deviceType) {
113
113
  onError == null ? void 0 : onError();
114
114
  return;
115
115
  }
116
- androidBridge.callHandler(apiName, params, callback, (e) => {
117
- console.log(e, "--- \u8C03\u7528android api\u62A5\u9519\uFF1A", apiName);
118
- if (onError) {
119
- onError == null ? void 0 : onError(e);
120
- }
121
- });
116
+ const res = androidBridge.callHandler(apiName, JSON.stringify(params));
117
+ callback(res);
122
118
  } else {
123
119
  onError == null ? void 0 : onError();
124
120
  console.log("--- \u6CA1\u83B7\u53D6\u5230js bridge ---");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/utils",
3
- "version": "1.0.42",
3
+ "version": "1.0.43",
4
4
  "sideEffects": false,
5
5
  "main": "./lib/index.js",
6
6
  "module": "./es/index.js",