jubo-sdk 1.2.2-beta.1 → 1.2.2-beta.2

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.
package/dist/index.cjs.js CHANGED
@@ -139,8 +139,9 @@ var global$o =
139
139
  // eslint-disable-next-line no-restricted-globals -- safe
140
140
  check(typeof self == 'object' && self) ||
141
141
  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
142
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
142
143
  // eslint-disable-next-line no-new-func -- fallback
143
- (function () { return this; })() || commonjsGlobal || Function('return this')();
144
+ (function () { return this; })() || Function('return this')();
144
145
 
145
146
  var global$n = global$o;
146
147
 
@@ -392,10 +393,10 @@ var store$1 = sharedStore;
392
393
  (shared$4.exports = function (key, value) {
393
394
  return store$1[key] || (store$1[key] = value !== undefined ? value : {});
394
395
  })('versions', []).push({
395
- version: '3.33.1',
396
+ version: '3.33.3',
396
397
  mode: 'global',
397
398
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
398
- license: 'https://github.com/zloirock/core-js/blob/v3.33.1/LICENSE',
399
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
399
400
  source: 'https://github.com/zloirock/core-js'
400
401
  });
401
402
 
@@ -5292,10 +5293,10 @@ var browserType = BrowserType({
5292
5293
  }]
5293
5294
  });
5294
5295
 
5295
- var _weixinJsSdk_1_6_2_weixinJsSdk = {exports: {}};
5296
+ var _weixinJsSdk_1_6_5_weixinJsSdk = {exports: {}};
5296
5297
 
5297
5298
  !(function (e, n) {
5298
- _weixinJsSdk_1_6_2_weixinJsSdk.exports = n(e);
5299
+ _weixinJsSdk_1_6_5_weixinJsSdk.exports = n(e);
5299
5300
  })(typeof window === "object" && window, function (r, e) {
5300
5301
  if (!r) {
5301
5302
  console.warn("can't use weixin-js-sdk in server side");
@@ -6186,8 +6187,8 @@ var _weixinJsSdk_1_6_2_weixinJsSdk = {exports: {}};
6186
6187
  }
6187
6188
  });
6188
6189
 
6189
- var _weixinJsSdk_1_6_2_weixinJsSdkExports = _weixinJsSdk_1_6_2_weixinJsSdk.exports;
6190
- var wx$1 = /*@__PURE__*/getDefaultExportFromCjs(_weixinJsSdk_1_6_2_weixinJsSdkExports);
6190
+ var _weixinJsSdk_1_6_5_weixinJsSdkExports = _weixinJsSdk_1_6_5_weixinJsSdk.exports;
6191
+ var wx$1 = /*@__PURE__*/getDefaultExportFromCjs(_weixinJsSdk_1_6_5_weixinJsSdkExports);
6191
6192
 
6192
6193
  var bridge = {
6193
6194
  default:commonjsGlobal,// for typescript
@@ -7206,7 +7207,7 @@ var JuboSdk = /** @class */function () {
7206
7207
  this.name = options.name;
7207
7208
  this.isApp = browserType.isShell('airmart') || device === 'ios' || device === 'android';
7208
7209
  this.isMiniProgram = browserType.isShell('wechat-miniprogram') || device === 'wx';
7209
- this.isAlipayMini = browserType.isShell('alipay-miniprogram') || device === 'alipay-mini';
7210
+ this.isAlipayMini = browserType.isShell('alipay-miniprogram') || device === 'alipay';
7210
7211
  this.isH5 = device === 'h5';
7211
7212
  this.isIframe = device === 'h5' && window.top !== window.self;
7212
7213
  this.isIos = browserType.system === 'ios' || device === 'ios';
@@ -7219,6 +7220,12 @@ var JuboSdk = /** @class */function () {
7219
7220
  if (this.isOldApp) {
7220
7221
  return new OldJuboSdk(options);
7221
7222
  }
7223
+ if (this.isAlipayMini) {
7224
+ var script = document.createElement('script');
7225
+ script.type = 'text/javascript';
7226
+ script.src = 'https://appx/web-view.min.js ';
7227
+ document.body.appendChild(script);
7228
+ }
7222
7229
  return this;
7223
7230
  }
7224
7231
  Object.defineProperty(JuboSdk.prototype, "detection", {
@@ -7313,6 +7320,11 @@ var JuboSdk = /** @class */function () {
7313
7320
  url: _this.options.miniProgramLogin || MINI_PROGRAM_LOGIN
7314
7321
  });
7315
7322
  resolve('');
7323
+ } else if (_this.isAlipayMini) {
7324
+ my.navigateTo({
7325
+ url: _this.options.miniProgramLogin || MINI_PROGRAM_LOGIN
7326
+ });
7327
+ resolve('');
7316
7328
  } else {
7317
7329
  dsBridge.call('toLogin', {}, function (res) {
7318
7330
  var resData = JSON.parse(res);
@@ -7413,6 +7425,16 @@ var JuboSdk = /** @class */function () {
7413
7425
  }
7414
7426
  }
7415
7427
  });
7428
+ } else if (this.isAlipayMini) {
7429
+ my.postMessage({
7430
+ data: {
7431
+ shareData: {
7432
+ title: options.title,
7433
+ path: options.webpage,
7434
+ imageUrl: options.thumbImage
7435
+ }
7436
+ }
7437
+ });
7416
7438
  } else {
7417
7439
  dsBridge.call('shareMiniProgram', {
7418
7440
  imgUrl: options.thumbImage,
@@ -7817,6 +7839,6 @@ exports.default = JuboSdk;
7817
7839
  exports.ls = ls;
7818
7840
 
7819
7841
  if(typeof window !== 'undefined') {
7820
- window._juboSDK_VERSION_ = '1.2.2-beta.1'
7842
+ window._juboSDK_VERSION_ = '1.2.2-beta.2'
7821
7843
  }
7822
7844
  //# sourceMappingURL=index.cjs.js.map