xctc-utils 1.4.4 → 1.4.5

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.
@@ -26,6 +26,7 @@ function weixinUrlCode(config) {
26
26
  (0, index_1.useSessionStorage)("weixinConfig", weixinConfig);
27
27
  var _a = weixinConfig.cryptoiv, cryptoiv = _a === void 0 ? "" : _a, _b = weixinConfig.cryptokey, cryptokey = _b === void 0 ? "" : _b;
28
28
  var search = loc.search; // ?code=0916SzFa1KH9TA0Ke7Ha1AQx6446SzFr&state=123
29
+ weixinInit();
29
30
  // 获取地址栏返回 code 参数
30
31
  var localCode = "";
31
32
  if (codeKey) {
@@ -201,6 +202,7 @@ function weixinInit() {
201
202
  else {
202
203
  wx = weixin;
203
204
  }
205
+ w['weixinConfig'] = wx;
204
206
  return wx;
205
207
  }
206
208
  // 前往微信授权登录页面
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
4
4
  "description": "localStorage存储\r ```\r sessionStorage存储\r ```\r crypto-js加密、解密\r ```\r 微信授权登录、微信分享\r ```\r 设备环境获取\r ```\r 是否是微信浏览器\r ```\r 时间戳转时间,字符串转时间戳",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",