crh-jssdk 1.0.9 → 1.0.10

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.
@@ -136,7 +136,7 @@ exports.default = {
136
136
  }
137
137
  params = {
138
138
  info_type: "wt",
139
- call_type: "login",
139
+ call_type: "callback_after_login",
140
140
  key_type: utils_1.ios ? "bh_zhfx" : "",
141
141
  };
142
142
  console.log("金圆统一获取交易登录Token,参数:", params);
@@ -13,14 +13,22 @@ exports.JYClientTHS = exports.jyBridge = exports.globalBridge = exports.Bridge =
13
13
  * 文档参考: client-demo/sdk/ClientTemplate.js
14
14
  */
15
15
  var JYClientTHS = {
16
+ // 标记bridge.init是否已调用,避免重复初始化
17
+ _bridgeInitCalled: false,
16
18
  /**
17
19
  * 初始化Bridge连接
18
20
  * 与ClientTemplate.js保持一致
19
21
  */
20
22
  init: function () {
23
+ var _this = this;
21
24
  try {
22
25
  this.connectWebViewJavascriptBridge(function (bridge) {
23
- bridge.init(function () { });
26
+ // 只有在未初始化过的情况下才调用bridge.init()
27
+ if (!_this._bridgeInitCalled && bridge && typeof bridge.init === 'function') {
28
+ bridge.init(function () { });
29
+ _this._bridgeInitCalled = true;
30
+ console.log('JYClientTHS bridge.init() 已调用');
31
+ }
24
32
  });
25
33
  }
26
34
  catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crh-jssdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "crh-jssdk",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {