xctc-utils 1.1.0 → 1.1.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.
@@ -10,14 +10,10 @@ var loc = w.location;
10
10
  var weixinConfig = {};
11
11
  function weixinUrlCode(config) {
12
12
  weixinConfig = config;
13
- // let word:any = {path:"/user/user-agreement",id:222}
14
- // let state:string = encrypt(word)
15
- // let search:string = loc.search // ?code=0916SzFa1KH9TA0Ke7Ha1AQx6446SzFr&state=123
16
- var search = "?state=8CF99EE640F8175269E6B83795902CAD2DCA8039E5FED78C9F16CA17501F37DB95F7B899A88A99075FB8D84C64AE65DCAC82FF4B039D6D7ACCF952F63A3BB7267CDDAC4202D4986DD5DB69D67DEDE440";
13
+ var search = loc.search; // ?code=0916SzFa1KH9TA0Ke7Ha1AQx6446SzFr&state=123
17
14
  // 获取地址栏返回 code 参数
18
15
  var codeKey = weixinConfig['codeKey'];
19
- // key:string="weixinCode"
20
- var localCode = "weixinCode";
16
+ var localCode = "";
21
17
  if (codeKey)
22
18
  localCode = w.sessionStorage.getItem(codeKey);
23
19
  if (!localCode && search && search.indexOf("code=") != -1) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xctc-utils",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
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",