xctc-utils 1.2.9 → 1.3.1

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.
@@ -130,10 +130,15 @@ function weixinLogin(code) {
130
130
  }
131
131
  var url = loc.origin;
132
132
  var hashVal = loc.hash;
133
- var state = (0, index_1.getSessionStorage)(stateKey);
133
+ (0, index_1.useSessionStorage)("stateKey===", stateKey);
134
+ var state = (0, index_1.getSessionStorage)(stateKey) || "";
134
135
  var str = "";
136
+ (0, index_1.useSessionStorage)("getstatedata===", state);
135
137
  if (state) {
138
+ (0, index_1.useSessionStorage)("stateKey===", "".concat(stateKey, "Obj"));
136
139
  var stateObj = (0, index_1.getSessionStorage)("".concat(stateKey, "Obj"));
140
+ (0, index_1.useSessionStorage)("getstateObj===", stateObj);
141
+ (0, index_1.useSessionStorage)("url11111===", url);
137
142
  for (var key in stateObj) {
138
143
  if (key == "path") {
139
144
  if (stateObj[key][0] == "/") {
@@ -142,6 +147,7 @@ function weixinLogin(code) {
142
147
  else {
143
148
  url = "".concat(url, "/#/").concat(stateObj.path);
144
149
  }
150
+ (0, index_1.useSessionStorage)("url22222===", url);
145
151
  }
146
152
  else {
147
153
  str += "".concat(key, "=").concat(stateObj[key], "&");
@@ -152,6 +158,7 @@ function weixinLogin(code) {
152
158
  url = "".concat(url, "?").concat(str);
153
159
  }
154
160
  }
161
+ (0, index_1.useSessionStorage)("url333333===", url);
155
162
  loc.replace(url);
156
163
  }
157
164
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
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",